summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/cscope.emacsen-install26
-rw-r--r--debian/cscope.emacsen-remove11
-rw-r--r--debian/cscope.install1
-rwxr-xr-xdebian/rules4
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