diff options
Diffstat (limited to 't/recipes/checks/emacs/elpa/emacsen-common/build-spec')
7 files changed, 89 insertions, 0 deletions
diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-compat b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-compat new file mode 100644 index 0000000..573541a --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-compat @@ -0,0 +1 @@ +0 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 diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-remove b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-remove new file mode 100755 index 0000000..9bc1fb3 --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-remove @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/muse + +FLAVOR=$1 +PACKAGE=foo-el + +if [ ${FLAVOR} != emacs ]; then + # if test -x /usr/sbin/install-info-altdir; then + # echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + # install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/emacs-wiki.info.gz + # fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-startup b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-startup new file mode 100644 index 0000000..3a059c3 --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/emacsen-startup @@ -0,0 +1,24 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian GNU/Linux muse package +;; +;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at> +;; Modified by Dirk Eddelbuettel <edd@debian.org> +;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com> +;; Adapted for Muse by Michael Olson <mwolson@gnu.org> + +;; The muse package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: + +(if (not (file-exists-p "/usr/share/emacs/site-lisp/foo-el")) + (message "Package foo-el removed but not purged. Skipping setup.") + (let ((prefix (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/foo-el"))) + (debian-pkg-add-load-path-item prefix) + (debian-pkg-add-load-path-item (concat prefix "/contrib"))) + + (load "foo-autoloads.el")) diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/install b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/install new file mode 100644 index 0000000..a2af265 --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/debian/install @@ -0,0 +1 @@ +foo.el /usr/share/emacs/site-lisp/foo-el diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/fill-values b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/fill-values new file mode 100644 index 0000000..f0df98f --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: emacsen-common +Skeleton: upload-non-native +Description: Tests for emacsen-common packages not using dh-elpa diff --git a/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/orig/foo.el b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/orig/foo.el new file mode 100644 index 0000000..414739b --- /dev/null +++ b/t/recipes/checks/emacs/elpa/emacsen-common/build-spec/orig/foo.el @@ -0,0 +1 @@ +(message "Hello, world") |