diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2009-05-23 15:13:26 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2009-05-23 15:13:26 +0200 |
commit | 04b38c4c173cef3b1b12163f1cf5a9b3cef8cb4a (patch) | |
tree | 0a39025a7e1b626259a7d940061493bc2fc5c697 | |
parent | f47abb895b3b82d270f3e67b79fec416e78d3fa3 (diff) |
Use dh_installemacsen, closes #515164
-rw-r--r-- | debian/cscope.emacsen-install | 26 | ||||
-rw-r--r-- | debian/cscope.emacsen-remove | 11 | ||||
-rw-r--r-- | debian/cscope.install | 1 | ||||
-rwxr-xr-x | debian/rules | 4 |
4 files changed, 40 insertions, 2 deletions
diff --git a/debian/cscope.emacsen-install b/debian/cscope.emacsen-install new file mode 100644 index 0000000..b3a70d4 --- /dev/null +++ b/debian/cscope.emacsen-install @@ -0,0 +1,26 @@ +#!/bin/sh +# +# emacsen install script for the Debian GNU/Linux cscope package +# based on the emacsen install script of the cmake package + +FLAVOUR=$1 +PACKAGE=cscope + +ELDIR=/usr/share/emacs/site-lisp/ +ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE +ELFILE="xscope.el" +FLAGS="-batch -no-site-file -l path.el -f batch-byte-compile" + +if [ $FLAVOUR != emacs ]; then + echo "install/$PACKAGE: Byte-compiling for $FLAVOUR" + + install -m 755 -d $ELCDIR + cd $ELDIR + cp $ELFILE $ELCDIR + cd $ELCDIR + cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF + $FLAVOUR $FLAGS $ELFILE + rm -f $ELFILE path.el +fi diff --git a/debian/cscope.emacsen-remove b/debian/cscope.emacsen-remove new file mode 100644 index 0000000..2feafac --- /dev/null +++ b/debian/cscope.emacsen-remove @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +FLAVOUR=$1 +PACKAGE=cscope +ELCFILE=xcscope.el + +if [ $FLAVOUR != emacs ]; then + echo "remove/$PACKAGE: Purging byte-compiled files for $FLAVOUR" + rm -f /usr/share/$FLAVOUR/site-lisp/$ELCFILE +fi diff --git a/debian/cscope.install b/debian/cscope.install new file mode 100644 index 0000000..2ff4aa3 --- /dev/null +++ b/debian/cscope.install @@ -0,0 +1 @@ +contrib/xcscope/xcscope.el usr/share/emacs/site-lisp diff --git a/debian/rules b/debian/rules index d944d01..d816384 100755 --- a/debian/rules +++ b/debian/rules @@ -51,13 +51,11 @@ install: build dh_testdir dh_testroot dh_prep - dh_installdirs usr/share/emacs/site-lisp $(MAKE) install DESTDIR=$(DEST) # Install xcscope install -m755 -p contrib/xcscope/cscope-indexer $(DEST)/usr/bin/ - install -m644 -p contrib/xcscope/xcscope.el $(DEST)/usr/share/emacs/site-lisp/ binary-indep: build install # We have nothing to do by default. @@ -65,6 +63,7 @@ binary-indep: build install binary-arch: build install dh_testdir dh_testroot + dh_install dh_installdocs AUTHORS NEWS README TODO dh_installman debian/ocs.1 debian/cscope-indexer.1 install -d $(DEST)/usr/share/doc/cscope/contrib/webcscope @@ -76,6 +75,7 @@ binary-arch: build install # Prevent CVS metadata from being installed find $(DEST)/usr/share/doc/cscope/contrib/webcscope -type d -name CVS | xargs rm -rf dh_installmenu + dh_installemacsen dh_installchangelogs ChangeLog dh_strip dh_compress |