]> git.notmuchmail.org Git - notmuch/blob - debian/notmuch-emacs.emacsen-install
debian: tighten dependency of python packages on libnotmuch.
[notmuch] / debian / notmuch-emacs.emacsen-install
1 #! /bin/sh -e
2 # /usr/lib/emacsen-common/packages/install/notmuch-emacs
3
4 # Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
5 # from the install scripts for gettext by Santiago Vila
6 # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
7
8 FLAVOR=$1
9 PACKAGE=notmuch
10
11 # We know that the notmuch emacs code doesn't work with emacs before emacs23
12 if [ ${FLAVOR} = emacs21 ]; then exit 0; fi
13 if [ ${FLAVOR} = emacs22 ]; then exit 0; fi
14 if [ ${FLAVOR} = xemacs21 ]; then exit 0; fi
15 if [ ${FLAVOR} = xemacs22 ]; then exit 0; fi
16
17 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
18
19 #FLAVORTEST=`echo $FLAVOR | cut -c-6`
20 #if [ ${FLAVORTEST} = xemacs ] ; then
21 #    SITEFLAG="-no-site-file"
22 #else
23 #    SITEFLAG="--no-site-file"
24 #fi
25 #FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
26 FLAGS="--no-site-file -q -batch -l path.el -f batch-byte-compile"
27
28 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
29 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
30
31 install -m 755 -d ${ELCDIR}
32 cd ${ELDIR}
33 FILES=`echo *.el`
34 cd ${ELCDIR}
35 for file in ${FILES}; do
36         ln -sf ${ELDIR}/${file} .
37 done
38
39 cat << EOF > path.el
40 (setq load-path (cons "." load-path) byte-compile-warnings nil)
41 EOF
42 ${FLAVOR} ${FLAGS} ${FILES}
43 rm -f *.el
44
45 exit 0