aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog4
-rw-r--r--debian/control4
-rwxr-xr-xdebian/notmuch-emacs.emacsen-install83
-rwxr-xr-xdebian/notmuch-emacs.emacsen-remove34
4 files changed, 78 insertions, 47 deletions
diff --git a/debian/changelog b/debian/changelog
index 2d1ebccc..3b7e00d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,10 @@ notmuch (0.18.1-1) unstable; urgency=medium
* New upstream bug fix release
* Tighten dependence of python packages on libnotmuch
(Closes: #749881).
+ * Redo emacsen-install script from sample in emacsen-common
+ (Closes: #739839).
- -- David Bremner <bremner@debian.org> Sat, 14 Jun 2014 07:17:18 -0300
+ -- David Bremner <bremner@debian.org> Sat, 14 Jun 2014 07:50:28 -0300
notmuch (0.18-3) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 0bfb120d..e2f2708e 100644
--- a/debian/control
+++ b/debian/control
@@ -110,10 +110,10 @@ Architecture: all
Section: mail
Breaks: notmuch (<<0.6~254~)
Replaces: notmuch (<<0.6~254~)
-Conflicts: emacsen-common (<< 2.0.0)
Depends: ${misc:Depends}, notmuch (>= ${source:Version}),
emacs23 (>= 23~) | emacs23-nox (>=23~) | emacs23-lucid (>=23~) |
- emacs24 (>= 24~) | emacs24-nox (>=24~) | emacs24-lucid (>=24~)
+ emacs24 (>= 24~) | emacs24-nox (>=24~) | emacs24-lucid (>=24~),
+ emacsen-common (>= 2.0.8)
Description: thread-based email index, search and tagging (emacs interface)
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
diff --git a/debian/notmuch-emacs.emacsen-install b/debian/notmuch-emacs.emacsen-install
index dfd8fda9..f35ef48e 100755
--- a/debian/notmuch-emacs.emacsen-install
+++ b/debian/notmuch-emacs.emacsen-install
@@ -1,45 +1,48 @@
-#! /bin/sh -e
+#!/bin/sh
# /usr/lib/emacsen-common/packages/install/notmuch-emacs
-
-# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
-# from the install scripts for gettext by Santiago Vila
-# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+set -e
FLAVOR=$1
PACKAGE=notmuch
-# We know that the notmuch emacs code doesn't work with emacs before emacs23
-if [ ${FLAVOR} = emacs21 ]; then exit 0; fi
-if [ ${FLAVOR} = emacs22 ]; then exit 0; fi
-if [ ${FLAVOR} = xemacs21 ]; then exit 0; fi
-if [ ${FLAVOR} = xemacs22 ]; then exit 0; fi
-
-echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
-
-#FLAVORTEST=`echo $FLAVOR | cut -c-6`
-#if [ ${FLAVORTEST} = xemacs ] ; then
-# SITEFLAG="-no-site-file"
-#else
-# SITEFLAG="--no-site-file"
-#fi
-#FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
-FLAGS="--no-site-file -q -batch -l path.el -f batch-byte-compile"
-
-ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
-ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
-
-install -m 755 -d ${ELCDIR}
-cd ${ELDIR}
-FILES=`echo *.el`
-cd ${ELCDIR}
-for file in ${FILES}; do
- ln -sf ${ELDIR}/${file} .
-done
-
-cat << EOF > path.el
-(setq load-path (cons "." load-path) byte-compile-warnings nil)
-EOF
-${FLAVOR} ${FLAGS} ${FILES}
-rm -f *.el
-
-exit 0
+case "${FLAVOR}" in
+ emacs)
+ return 0
+ ;;
+ xemacs*|emacs2[12])
+ # patches welcome.
+ echo install/${PACKAGE}: skipping install for unsupported emacsen flavor ${FLAVOR}
+ exit 0
+ ;;
+ *)
+ echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+esac
+
+
+elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+el_dir=/usr/share/emacs/site-lisp/${PACKAGE}
+
+byte_compile_options="--quick --directory=${el_dir} -batch -f batch-byte-compile"
+
+echo install/${PACKAGE}: byte-compiling for ${FLAVOR}
+
+[ -d ${elc_dir} ] || mkdir ${elc_dir}
+
+# Create symlinks to the .el files (see section 6E in debian-emacs
+# polcy). This makes complation easy, and also allows find-function
+# and find-library to work properly.
+(cd ${elc_dir} && cp -s ${el_dir}/*.el .)
+
+# Byte compile them
+(cd ${elc_dir}
+ set +e
+ ${FLAVOR} ${byte_compile_options} *.el > Install.log 2>&1
+ if test $? -ne 0
+ then
+ cat Install.log
+ exit 1
+ fi
+ set -e
+ gzip -9 Install.log)
+
+exit 0;
diff --git a/debian/notmuch-emacs.emacsen-remove b/debian/notmuch-emacs.emacsen-remove
index 3b433ae2..a5553209 100755
--- a/debian/notmuch-emacs.emacsen-remove
+++ b/debian/notmuch-emacs.emacsen-remove
@@ -1,8 +1,34 @@
-#!/bin/sh -e
-# /usr/lib/emacsen-common/packages/remove/notmuch-emacs
+#!/bin/sh
+# /usr/lib/emacsen-common/packages/remove/notmuch
+
+set -e
FLAVOR=$1
PACKAGE=notmuch
+elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+case "${FLAVOR}" in
+ emacs)
+ return 0
+ ;;
+ xemacs*|emacs2[12])
+ # patches welcome.
+ echo install/${PACKAGE}: skipping removal for unsupported emacsen flavor ${FLAVOR}
+ exit 0
+ ;;
+ *)
+ echo remove/${PACKAGE}: Handling removal for emacsen flavor ${FLAVOR}
+esac
+
+echo remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR}
+
+echo emacsen-common: purging byte-compiled files for ${FLAVOR}
+rm -f ${elc_dir}/*.elc
+rm -f ${elc_dir}/*.el
+rm -f ${elc_dir}/Install.log*
+if test -e "${elc_dir}"
+then
+ rmdir --ignore-fail-on-non-empty "${elc_dir}"
+fi
-echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
-rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+exit 0;