]> git.notmuchmail.org Git - notmuch/commitdiff
debian: update notmuch-emacs for emacsen-common 2.0.8
authorDavid Bremner <david@tethera.net>
Sat, 14 Jun 2014 10:50:52 +0000 (07:50 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 14 Jun 2014 11:53:56 +0000 (08:53 -0300)
- redo install/remove scripts from new samples
- symlink .el files properly
- add depends instead of conflicts

debian/changelog
debian/control
debian/notmuch-emacs.emacsen-install
debian/notmuch-emacs.emacsen-remove

index 2d1ebccc9e030ff53d493e5121e436ba3a506fcc..3b7e00d7ce63b9a355f20003e1bd17e1b0862b71 100644 (file)
@@ -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).
   * 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
 
 
 notmuch (0.18-3) unstable; urgency=medium
 
index 0bfb120d07ac0c07d36dec14bc1b020580bea8f1..e2f2708e4234b2728c3f84f31d310beeb8bc0b89 100644 (file)
@@ -110,10 +110,10 @@ Architecture: all
 Section: mail
 Breaks: notmuch (<<0.6~254~)
 Replaces: notmuch (<<0.6~254~)
 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~) |
 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
 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
index dfd8fda94ded28f9080980d1193a4c9c57162564..f35ef48e66e611aea45c8c04e98ff8af3d1ba976 100755 (executable)
@@ -1,45 +1,48 @@
-#! /bin/sh -e
+#!/bin/sh
 # /usr/lib/emacsen-common/packages/install/notmuch-emacs
 # /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
 
 
 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;
index 3b433ae2bebe0eb13277caf0139a43a1ee213cf3..a555320983dcf693f3ed82fdf867c4dcd1c102c0 100755 (executable)
@@ -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
 
 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;