]> git.notmuchmail.org Git - notmuch/blob - debian/notmuch.emacsen-install
merge changes from upstream
[notmuch] / debian / notmuch.emacsen-install
1 #! /bin/sh -e
2 # /usr/lib/emacsen-common/packages/install/notmuch
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 if [ ${FLAVOR} = emacs ]; then exit 0; fi
12
13 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
14
15 #FLAVORTEST=`echo $FLAVOR | cut -c-6`
16 #if [ ${FLAVORTEST} = xemacs ] ; then
17 #    SITEFLAG="-no-site-file"
18 #else
19 #    SITEFLAG="--no-site-file"
20 #fi
21 #FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
22 FLAGS="--no-site-file -q -batch -l path.el -f batch-byte-compile"
23
24 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
25 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
26
27 install -m 755 -d ${ELCDIR}
28 cd ${ELDIR}
29 FILES=`echo *.el`
30 cd ${ELCDIR}
31 ln -sf ${ELDIR}/${FILES} ${ELCDIR}
32
33 cat << EOF > path.el
34 (setq load-path (cons "." load-path) byte-compile-warnings nil)
35 EOF
36 ${FLAVOR} ${FLAGS} ${FILES}
37 rm -f path.el
38
39 exit 0