[DRE-commits] [rabbit] 01/01: Add emacsen-compat, update emacsen-{install, remove}
Youhei SASAKI
uwabami-guest at moszumanska.debian.org
Wed Mar 18 07:57:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
uwabami-guest pushed a commit to branch master
in repository rabbit.
commit 3d320b0b77b521c8a6ae443b95d9499cf639d384
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Wed Mar 18 15:17:48 2015 +0900
Add emacsen-compat, update emacsen-{install,remove}
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
---
debian/changelog | 7 +++++++
debian/control | 3 ++-
debian/rabbit-mode.emacsen-compat | 1 +
debian/rabbit-mode.emacsen-install | 42 ++++++++++++++++++++------------------
debian/rabbit-mode.emacsen-remove | 20 ++++++++----------
debian/rabbit-mode.install | 2 +-
debian/rabbit-mode.postinst | 16 +++++++++++++++
debian/rabbit-mode.preinst | 23 +++++++++++++++++++++
debian/rabbit-mode.prerm | 15 ++++++++++++++
9 files changed, 95 insertions(+), 34 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f7840d0..bd29522 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+rabbit (2.1.6-2) unstable; urgency=medium
+
+ * Add emacsen-compat, update emacsen-{install,remove}
+ + Follow new emacsen policy
+
+ -- Youhei SASAKI <uwabami at gfd-dennou.org> Wed, 18 Mar 2015 15:17:52 +0900
+
rabbit (2.1.6-1) unstable; urgency=medium
* Imported Upstream version 2.1.6
diff --git a/debian/control b/debian/control
index 7f9df15..7aaeb86 100644
--- a/debian/control
+++ b/debian/control
@@ -58,7 +58,8 @@ Description: presentation tool using RD, a simple text format
Package: rabbit-mode
Architecture: all
-Depends: ${misc:Depends}, rabbit, rdtool-elisp, emacs | emacs24 | emacs23
+Depends: ${misc:Depends}, rabbit, rdtool-elisp, emacs | emacsen
+Conflicts: emacsen-common (<< 2.0.0)
Description: Emacs-lisp rabbit-mode for writing RD document using Rabbit
Rabbit is an application to do presentations with RD documents. RD is a
simple, easy-to-read, and easy-to-write text format like Wiki. Rabbit has
diff --git a/debian/rabbit-mode.emacsen-compat b/debian/rabbit-mode.emacsen-compat
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/debian/rabbit-mode.emacsen-compat
@@ -0,0 +1 @@
+0
diff --git a/debian/rabbit-mode.emacsen-install b/debian/rabbit-mode.emacsen-install
index 0522e49..a3b0891 100644
--- a/debian/rabbit-mode.emacsen-install
+++ b/debian/rabbit-mode.emacsen-install
@@ -1,12 +1,9 @@
-#! /bin/sh -e
+#! /bin/sh
# /usr/lib/emacsen-common/packages/install/rabbit
-#
-# Written by Jim Van Zandt <jrv at debian.org>, borrowing heavily
-# from the install scripts for gettext by Santiago Vila
-# <sanvila at ctv.es> and octave by Dirk Eddelbuettel <edd at debian.org>.
+set -e
FLAVOR=$1
-PACKAGE=rabbit
+PACKAGE=rabbit-mode
case $FLAVOR in
emacs|*xemacs*|emacs21|emacs20|emacs19|mule2)
@@ -22,21 +19,22 @@ FLAGS="-no-site-file -q -batch -l path.el -f batch-byte-compile"
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
-
-cd "$ELDIR"
-LINKS=`echo *.el`
-
+ELCSTAMP=$ELCDIR/compile-stamp
+if [ -f "$ELCSTAMP" ]; then
+ echo "install/${PACKAGE}: already byte-compiled for $FLAVOR, skipped"
+ exit 0
+fi
+echo "install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}" "$ELDIR"
if [ ! -d "$ELCDIR" ]; then
- mkdir -p "$ELCDIR"
- chmod 755 "$ELCDIR"
+ install -m 755 -d "$ELCDIR"
fi
-cd "$ELCDIR"
-TOELDIR=../../../emacs/site-lisp/$PACKAGE
-rm -f *.el path.el
-for f in $LINKS; do
- ln -sf "$TOELDIR/$f" ./
+cd ${ELDIR}
+FILES=`echo *.el`
+for f in ${FILES} ; do
+ [ -L ${ELCDIR}/$f ] && rm -f ${ELCDIR}/$f ;
+ cp $f ${ELCDIR}/
done
-FILES=`/bin/ls -1 *.el`
+cd "$ELCDIR"
cat << EOF > path.el
(setq load-path (cons "." load-path))
(setq byte-compile-warnings nil)
@@ -45,6 +43,10 @@ cat << EOF > path.el
EOF
${FLAVOR} ${FLAGS} ${FILES}
chmod 644 *.elc
-rm -f path.el
-
+rm -f *.el path.el path.elc
+ELCFILES=`echo *.elc`
+for f in ${ELCFILES} ; do
+ ln -s ../../../emacs/site-lisp/${PACKAGE}/`basename $f .elc`.el .
+done
+touch "$ELCSTAMP"
exit 0
diff --git a/debian/rabbit-mode.emacsen-remove b/debian/rabbit-mode.emacsen-remove
index da28d00..f3a876b 100644
--- a/debian/rabbit-mode.emacsen-remove
+++ b/debian/rabbit-mode.emacsen-remove
@@ -1,16 +1,12 @@
-#!/bin/sh -e
-# /usr/lib/emacsen-common/packages/remove/rabbit
-
+#! /bin/sh
+# /usr/lib/emacsen-common/packages/remove/rabbit-mode
+set -e
FLAVOR=$1
-PACKAGE=rabbit
-
-case $FLAVOR in
- emacs|*xemacs*|emacs20|emacs19|mule2)
- exit 0
- ;;
-esac
+PACKAGE=rabbit-mode
-echo "remove/$PACKAGE: purging byte-compiled files for $FLAVOR"
-rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+if [ ${FLAVOR} != emacs ]; then
+ echo "remove/$PACKAGE: purging byte-compiled files for $FLAVOR"
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
exit 0
diff --git a/debian/rabbit-mode.install b/debian/rabbit-mode.install
index 5dcbe54..8563341 100644
--- a/debian/rabbit-mode.install
+++ b/debian/rabbit-mode.install
@@ -1 +1 @@
-misc/emacs/rabbit-mode.el usr/share/emacs/site-lisp/rabbit/
+misc/emacs/rabbit-mode.el usr/share/emacs/site-lisp/rabbit-mode/
diff --git a/debian/rabbit-mode.postinst b/debian/rabbit-mode.postinst
new file mode 100644
index 0000000..1717653
--- /dev/null
+++ b/debian/rabbit-mode.postinst
@@ -0,0 +1,16 @@
+#! /bin/sh
+set -e
+PACKAGE=rabbit-mode
+
+if [ ! -e /var/lib/emacsen-common/state/package/installed/emacsen-common ]
+then
+ # Fallback to emacsen-common 1.x
+ if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ]
+ then
+ /usr/lib/emacsen-common/emacs-package-install $PACKAGE
+ fi
+else
+ mkdir -p -m 0755 /var/lib/emacsen-common/state/package/installed
+ touch /var/lib/emacsen-common/state/package/installed/$PACKAGE
+#DEBHELPER#
+fi
diff --git a/debian/rabbit-mode.preinst b/debian/rabbit-mode.preinst
new file mode 100644
index 0000000..fd39d66
--- /dev/null
+++ b/debian/rabbit-mode.preinst
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+ install|upgrade)
+ for f in emacs emacs22 emacs23 emacs24 ; do
+ SITEDIR=/usr/share/$f/site-lisp/rabbit
+ if [ -d $SITEDIR ]
+ then
+ rm -fr $SITEDIR
+ fi
+ done
+ ;;
+ abort-upgrade)
+ ;;
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rabbit-mode.prerm b/debian/rabbit-mode.prerm
new file mode 100644
index 0000000..45e9802
--- /dev/null
+++ b/debian/rabbit-mode.prerm
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+PACKAGE=rabbit-mode
+
+if [ ! -e /var/lib/emacsen-common/state/package/installed/emacsen-common ]
+then
+ # Fallback to emacsen-common 1.x
+ if [ -x /usr/lib/emacsen-common/emacs-package-remove ]
+ then
+ /usr/lib/emacsen-common/emacs-package-remove $PACKAGE
+ fi
+else
+#DEBHELPER#
+ rm -f /var/lib/emacsen-common/state/package/installed/$PACKAGE
+fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rabbit.git
More information about the Pkg-ruby-extras-commits
mailing list