]> git.notmuchmail.org Git - notmuch/blob - debian/notmuch.emacsen-install
debian: Fix Vcs-Browser link
[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 # We know that the notmuch emacs code doesn't work with emacs before emacs23
14 if [ ${FLAVOR} = emacs21 ]; then exit 0; fi
15 if [ ${FLAVOR} = emacs22 ]; then exit 0; fi
16 if [ ${FLAVOR} = xemacs21 ]; then exit 0; fi
17 if [ ${FLAVOR} = xemacs22 ]; then exit 0; fi
18
19 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
20
21 #FLAVORTEST=`echo $FLAVOR | cut -c-6`
22 #if [ ${FLAVORTEST} = xemacs ] ; then
23 #    SITEFLAG="-no-site-file"
24 #else
25 #    SITEFLAG="--no-site-file"
26 #fi
27 #FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
28 FLAGS="--no-site-file -q -batch -l path.el -f batch-byte-compile"
29
30 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
31 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
32
33 install -m 755 -d ${ELCDIR}
34 cd ${ELDIR}
35 FILES=`echo *.el`
36 cd ${ELCDIR}
37 for file in ${FILES}; do
38         ln -sf ${ELDIR}/${file} .
39 done
40
41 cat << EOF > path.el
42 (setq load-path (cons "." load-path) byte-compile-warnings nil)
43 EOF
44 ${FLAVOR} ${FLAGS} ${FILES}
45 rm -f *.el
46
47 exit 0