debian: update notmuch-emacs for emacsen-common 2.0.8

- redo install/remove scripts from new samples
- symlink .el files properly
- add depends instead of conflicts
This commit is contained in:
David Bremner 2014-06-14 07:50:52 -03:00
parent 17e3ef18ae
commit 435cd249a0
4 changed files with 72 additions and 41 deletions

4
debian/changelog vendored
View 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).
* 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

4
debian/control vendored
View file

@ -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

View file

@ -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
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;

View file

@ -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}
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
rm -rf /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
exit 0;