Merged from mwolson@gnu.org--2006 (patch 34)
[planner-el.git] / debian / emacsen-install
blob14ae31b3e91edf856e2a7a1fa4efccff8c4a2b07
1 #! /bin/sh -e
2 # /usr/lib/emacsen-common/packages/install/planner-el
4 # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
5 # from the install scripts for gettext by Santiago Vila
6 # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
8 FLAVOR=$1
9 PACKAGE=planner-el
11 if [ ${FLAVOR} = emacs ]; then exit 0; fi
13 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
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"
23 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
24 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
26 # Install-info-altdir does not actually exist.
27 # Maybe somebody will write it.
28 if test -x /usr/sbin/install-info-altdir; then
29 echo install/${PACKAGE}: install Info links for ${FLAVOR}
30 install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
33 install -m 755 -d ${ELCDIR}
34 cd ${ELDIR}
35 FILES=`ls -1 *.el | grep -v autoloads`
36 cd ${ELCDIR}
38 cat << EOF > path.el
39 (setq load-path (cons "." (cons "${ELDIR}/contrib" load-path))
40 EOF
41 ${FLAVOR} ${FLAGS} ${FILES} 2>&1 | gzip -9qf > CompilationLog.gz
42 rm -f path.el
43 ( cd ${ELDIR}
44 for f in *.el; do
45 ln -sf ${ELDIR}/${f} ${ELCDIR}/${f}
46 done
49 exit 0