Commit d87d1abe authored by Axel Beckert's avatar Axel Beckert

Install tpp-mode.el as auto-loaded emacs mode

No more install tpp-mode.el into /usr/share/doc/tpp/contrib/.
parent ea09344c
......@@ -3,6 +3,8 @@ tpp (1.3.1-4) UNRELEASED; urgency=low
* Add CVE id to 15-optional-exec.patch and previous changelog entry
* Bump Standards-Version to 3.9.5 (no changes).
* Add a debian/upstream/metadata file according to DEP-12.
* Install tpp-mode.el as auto-loaded emacs mode and no more into
/usr/share/doc/tpp/contrib/.
-- Axel Beckert <abe@debian.org> Fri, 21 Jun 2013 19:01:37 +0200
......
#!/bin/sh
# /usr/lib/emacsen-common/packages/install/tpp
# 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>.
# modified for ratpoison by Bernhard R. Link <brlink@debian.org>
# modified for tpp by Axel Beckert <abe@debian.org>
set -e
FLAVOR="$1"
PACKAGE=tpp
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
FILES=tpp-mode.el
if [ ${FLAVOR} = emacs ]; then
exit 0
fi
for file in ${FILES} ; do
if [ ! -f ${ELDIR}/${file} ]; then
echo "Warning: missing file ${ELDIR}/${file}!" >&2
exit 0
fi
done
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"
install -m 755 -d ${ELCDIR}
cd ${ELDIR}
cp ${FILES} ${ELCDIR}
cd ${ELCDIR}
cat << EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
${FLAVOR} ${FLAGS} ${FILES}
rm -f *.el path.el
exit 0
#!/bin/sh
# /usr/lib/emacsen-common/packages/remove/tpp
set -e
FLAVOR=$1
PACKAGE=tpp
if [ ${FLAVOR} != emacs ]; then
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
fi
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian GNU/Linux tpp 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 tpp by Axel Beckert <abe@debian.org>
;; The tpp package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs23,
;; emacs24, xemacs21, …). The compiled code is then installed in a
;; subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
;; Set up to autoload
(autoload 'tpp-mode "tpp-mode" "Major mode for editing TPP slides" t)
(setq auto-mode-alist
(cons '("\\.tpp\\'" . tpp-mode) auto-mode-alist))
contrib/tpp-mode.el /usr/share/emacs/site-lisp/tpp/
......@@ -6,6 +6,7 @@
override_dh_auto_install:
$(MAKE) install prefix=$(CURDIR)/debian/tpp/usr
dh_auto_install --buildsystem=ruby
rm -f debian/tpp/usr/share/doc/tpp/contrib/tpp-mode.*
override_dh_compress:
dh_compress -X .tpp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment