diff options
Diffstat (limited to 't/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-install')
-rwxr-xr-x | t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-install | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-install b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-install new file mode 100755 index 0000000..32dd6a5 --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-install @@ -0,0 +1,44 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/muse + +# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily +# from the install scripts for gettext by Santiago Vila +# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>. + +FLAVOR=$1 +PACKAGE=foo-el + +if [ ${FLAVOR} = emacs ]; 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" +ELPREFIX=/usr/share/emacs/site-lisp/${PACKAGE} + +for i in ${PACKAGE} ${PACKAGE}/contrib; do + + ELDIR=/usr/share/emacs/site-lisp/$i + ELCDIR=/usr/share/${FLAVOR}/site-lisp/$i + + install -m 755 -d ${ELCDIR} + cd ${ELDIR} + FILES=`ls -1 *.el | grep -v autoloads` + rm -f ${ELCDIR}/*.el + cd ${ELCDIR} + ln -sf ${ELDIR}/*.el . + + cat << EOF > path.el +(setq load-path (cons "${ELPREFIX}" (cons "${ELPREFIX}/contrib" load-path)) + byte-compile-warnings nil) +EOF + ${FLAVOR} ${FLAGS} ${FILES} 2>&1 | gzip -9qf > CompilationLog.gz + rm -f path.el +done + +exit 0 |