summaryrefslogtreecommitdiff
path: root/debian/urweb-mode.emacsen-install
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2015-03-10 22:37:13 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2015-03-10 22:37:13 -0400
commit1b9995725af7f9deae1acc09db1d7801aab78e14 (patch)
treecf68c0f8f40f210994f8c93a1e046f32173ab2f5 /debian/urweb-mode.emacsen-install
parentb29f23f2d2f2dd587eccb9c84a77501dc9746adb (diff)
Package urweb-mode
Diffstat (limited to 'debian/urweb-mode.emacsen-install')
-rw-r--r--debian/urweb-mode.emacsen-install30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/urweb-mode.emacsen-install b/debian/urweb-mode.emacsen-install
new file mode 100644
index 00000000..9f47ce49
--- /dev/null
+++ b/debian/urweb-mode.emacsen-install
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+#/usr/lib/emacsen-common/packages/install/urweb-mode
+
+FLAVOR=$1
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+PACKAGE=urweb-mode
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+# The byte-compiled files goes into the site-lisp directory.
+BCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+install -m 755 -d ${BCDIR}
+
+# The elisp source files are in the generic site-lisp directory.
+SRCDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+SRC=`find ${SRCDIR} -name '*.el' -exec basename '{}' ';'`
+
+# Prepare for byte-compiling the source files.
+cd ${BCDIR}
+ln -sf ${SRCDIR}/*.el .
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+
+# Byte-compile elisp files.
+FLAGS="--no-site-file --no-init-file --batch -l path.el -f batch-byte-compile"
+${FLAVOR} ${FLAGS} ${SRC}
+rm -f path.el
+
+exit 0