summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-10-23 19:49:45 (GMT)
committer Jaromil <jaromil@dyne.org>2011-10-23 19:49:45 (GMT)
commit32e0e0fcdcafb28ba7f4c42df1861721a600a24d (patch)
tree09ba3cba83b68fed643033d62f85a4b7ff45116e
parent0dd4c46bff8e28f0b79879c57c11e695ac64866b (diff)
new compilation mechanism
uses a template from share/autorg/elisp fills in the configured paths and runs emacs in batch mode
-rw-r--r--.gitignore2
-rw-r--r--DEPS9
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac19
-rw-r--r--share/Makefile.am10
-rw-r--r--share/awk/Makefile.am5
-rw-r--r--share/config.in14
-rw-r--r--share/elisp/Makefile.am10
-rw-r--r--share/elisp/autorg.el.in4
-rw-r--r--share/elisp/org-batch.el.in27
-rw-r--r--share/manual/Makefile.am12
-rw-r--r--src/Makefile.am33
12 files changed, 98 insertions, 51 deletions
diff --git a/.gitignore b/.gitignore
index 3c9c74c..5b24c07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,3 +47,5 @@ src/autorg-*
!/src/*.png
stamp-h1
tags
+src/old
+share/config
diff --git a/DEPS b/DEPS
new file mode 100644
index 0000000..75d7bd9
--- /dev/null
+++ b/DEPS
@@ -0,0 +1,9 @@
+# Dependencies for AutOrg
+
++ Debian
+req: zsh
+req: emacs
+req: org-mode
+opt: xapian-tools
+
+# TODO: other distros
diff --git a/Makefile.am b/Makefile.am
index 8214e7d..8857db6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
SUBDIRS = share src
+install: install-data
+
# org/foo.css will supercede src/foo.css
CSS_FILES = $(shell find org src -type f -name "*.css" -print | sort -k 4 -u 2>/dev/null)
ORG_FILES = $(shell find doc org -type f -name "*.org" -print 2>/dev/null)
@@ -54,7 +56,7 @@ new-pages: autorg-greeting autorg-dirs
@$(call autorg_publish,autorg,)
@echo
-all: targets new-pages
+all:
clean:
@cd src && make clean
diff --git a/configure.ac b/configure.ac
index d83eb95..241971d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ dnl ==============================================================
AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects -Wno-portability])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AC_CONFIG_SRCDIR([doc/autonomy-is-organization.org])
+AC_CONFIG_SRCDIR([src/autorg])
dnl Checks for programs.
AC_PROG_INSTALL
@@ -85,12 +85,9 @@ AC_SUBST(DYNE_VERSION_INFO)
dnl ###########################################################################
dnl ###### now about compile time paths
AC_MSG_CHECKING([which installation prefix to use])
-if test "x${prefix}" = "xNONE"; then
- prefix=`pwd`
-fi
AC_MSG_RESULT([${prefix}])
-AUTORG_PATH="${prefix}"
-AC_SUBST(AUTORG_PATH)
+AUTORG_DATADIR="${prefix}"
+AC_SUBST(AUTORG_DATADIR)
AC_MSG_CHECKING([for which domain we are configuring])
AC_ARG_WITH(domain,
@@ -110,12 +107,18 @@ AC_MSG_RESULT([${with_orgmode}])
ORGMODE_PATH="$with_orgmode"
AC_SUBST(ORGMODE_PATH)
+PACKAGE_DATA_DIR='${prefix}/share/autorg'
+AC_SUBST(PACKAGE_DATA_DIR)
+
+
dnl alphabetic order on dir/subdir, but Makefile sorts before everything
AC_CONFIG_FILES([
Makefile
-etc/Makefile
-etc/apache/Makefile
src/Makefile
+share/Makefile
+share/awk/Makefile
+share/elisp/Makefile
+share/manual/Makefile
])
AC_OUTPUT
diff --git a/share/Makefile.am b/share/Makefile.am
new file mode 100644
index 0000000..b2eed02
--- /dev/null
+++ b/share/Makefile.am
@@ -0,0 +1,10 @@
+SUBDIRS = awk elisp manual
+
+EXTRA_DIST = config.in
+
+all:
+ sed -e 's@\%datadir\%@'"$(datadir)"'@' $(top_srcdir)/share/config.in > \
+ $(top_builddir)/share/config
+
+install: all
+ install -m 0644 -D config /etc/autorg/config \ No newline at end of file
diff --git a/share/awk/Makefile.am b/share/awk/Makefile.am
new file mode 100644
index 0000000..1f9c2a8
--- /dev/null
+++ b/share/awk/Makefile.am
@@ -0,0 +1,5 @@
+EXTRA_DIST = server.awk
+
+Awkdir = $(prefix)/share/autorg/awk
+Awk_DATA = server.awk
+
diff --git a/share/config.in b/share/config.in
new file mode 100644
index 0000000..6363937
--- /dev/null
+++ b/share/config.in
@@ -0,0 +1,14 @@
+# file locations
+WORKDIR=$HOME/.autorg
+DATADIR=%datadir%/autorg
+
+# local web access
+WEBHOST=localhost
+PORT=8080
+
+# Bluetooth device address and directory
+MOBILE=11:22:33:44:55:66
+MOBILEDIR=/data/AutOrg
+
+# Additional Emacs options
+EMACS_OPTS=""
diff --git a/share/elisp/Makefile.am b/share/elisp/Makefile.am
new file mode 100644
index 0000000..91dbdff
--- /dev/null
+++ b/share/elisp/Makefile.am
@@ -0,0 +1,10 @@
+
+EXTRA_DIST = autorg.el.in org-batch.el.in
+
+Elispdir = $(prefix)/share/autorg/elisp
+Elisp_DATA = autorg.el.in org-batch.el.in
+
+install: install-am
+# install-data-hook:
+# install -m 0644 -D autorg.el.in $(Elispdir)/autorg.el.in
+# install -m 0644 -D org-batch.el.in $(Elispdir)/org-batch.el.inmake \ No newline at end of file
diff --git a/share/elisp/autorg.el.in b/share/elisp/autorg.el.in
index 705453a..a288524 100644
--- a/share/elisp/autorg.el.in
+++ b/share/elisp/autorg.el.in
@@ -5,3 +5,7 @@
:online-suffix ".html"
:working-suffix ".org"
)))
+
+; directory used for mobile-org files
+(setq org-mobile-directory "~/.autorg")
+
diff --git a/share/elisp/org-batch.el.in b/share/elisp/org-batch.el.in
index f666ce7..f516862 100644
--- a/share/elisp/org-batch.el.in
+++ b/share/elisp/org-batch.el.in
@@ -7,15 +7,14 @@
'(org-modules (quote (org-bbdb org-bibtex org-info org-jsinfo
org-irc org-w3m org-mouse org-eval
org-eval-light org-exp-bibtex org-man
- org-mtags org-panel org-R
- org-special-blocks org-exp-blocks)))
+ org-panel org-R org-special-blocks
+ org-exp-blocks)))
;;; ORG mode
(require 'org-install)
(require 'org-latex)
(require 'org-export-latex)
(require 'org-exp-blocks)
-(require 'org-mtags)
(require 'htmlize)
; (require 'blorg)
@@ -70,20 +69,20 @@
(require 'org-publish)
(setq org-publish-project-alist
'(
- ("autorg-docs"
- :base-directory "%autorg_path%/doc"
+ ("manual"
+ :base-directory "%data_path%/manual"
:base-extension "org"
- :publishing-directory "%autorg_path%/pub/doc"
+ :publishing-directory "%autorg_path%/manual"
:recursive t
:publishing-function org-publish-org-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
)
- ("autorg-pages"
- :base-directory "%autorg_path%/org"
+ ("notes"
+ :base-directory "%autorg_path%/notes"
:base-extension "org"
- :publishing-directory "%autorg_path%/pub"
+ :publishing-directory "%autorg_path%/notes/pub"
:recursive t
:publishing-function org-publish-org-to-html
:headline-levels 4 ; Just the default for this project.
@@ -98,7 +97,8 @@
:publishing-function org-publish-attachment
)
- ("autorg" :components ("autorg-docs" "autorg-pages" "autorg-static"))
+ ("autorg" :components ("manual" "notes" "autorg-static"))
+; ("autorg" :components ("manual" "notes"))
))
;;(org-publish-project "autorg")
@@ -127,3 +127,10 @@
;; project is still a string here.
(list (assoc project org-publish-project-alist))
(list project))))))
+
+; directory used for mobile-org files
+
+(custom-set-variables
+ '(org-mobile-directory "%autorg_path%/notes")
+ '(org-agenda-files (quote ("%autorg_path%/notes.org" "%autorg_path%/agenda.org")))
+ )
diff --git a/share/manual/Makefile.am b/share/manual/Makefile.am
new file mode 100644
index 0000000..9910ae7
--- /dev/null
+++ b/share/manual/Makefile.am
@@ -0,0 +1,12 @@
+
+EXTRA_DIST = 404.org API.org autonomy-is-organization.org \
+ autorg-bg.png autorg.css autorg-logo.png favicon.ico \
+ get-started.org hacking.org index.org org-gtd.org \
+ org-protocol.org SemVer.org TODO.org
+
+Manualdir = $(prefix)/share/autorg/manual
+Manual_DATA = 404.org API.org autonomy-is-organization.org \
+ autorg-bg.png autorg.css autorg-logo.png favicon.ico \
+ get-started.org hacking.org index.org org-gtd.org \
+ org-protocol.org SemVer.org TODO.org
+
diff --git a/src/Makefile.am b/src/Makefile.am
index e8820b2..26184e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,32 +1 @@
-ELISPSCRIPTS = $(shell find . -type f -name "*.el.in" -print | sed 's/.el.in/.el/g')
-SHELLSCRIPTS = $(shell find . -type f -name "*.sh.in" -print | sed 's/.sh.in/.sh/g')
-AUTORG_COMMAND = $(shell find . -type f -name "autorg*.in" -print | sed 's/.in//g')
-
-mkscript = sed \
- -e "s|%autorg_path%|$(AUTORG_PATH)|g" \
- -e "s|%autorg_domain%|$(AUTORG_DOMAIN)|g" \
- -e "s|%orgmode_path%|$(ORGMODE_PATH)|g" \
- -e "s|%autorg_version%|$(VERSION)|g" \
- $1.in
-
-autorg: autorg.in
- $(call mkscript,$@) > $@
- @chmod +x $@
-
-autorg-%: autorg-%.in
- $(call mkscript,$@) > $@
- @chmod +x $@
-
-%.el : %.el.in
- $(call mkscript,$@) > $@
-
-%.sh : %.sh.in
- $(call mkscript,$@) > $@
- @chmod +x $@
-
-all: ${ELISPSCRIPTS} ${SHELLSCRIPTS} ${AUTORG_COMMAND}
-
-clean:
- rm -f *.el *.sh
- rm -f ${AUTORG_COMMAND}
- rm -f *~
+bin_SCRIPTS = autorg