From 4d4cd67eff53dd8bba739d3f38e1ba38a9ba4f11 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 3 Nov 2013 14:28:43 +0200 Subject: Update dh_installemacsen for emacsen-common 2.0. Update dh_installemacsen and related scripts to follow /usr/share/doc/emacsen-common/debian-emacs-policy.gz as of emacsen-common package version 2.0.5. The changes include: * Install debian/package.emacsen-compat into usr/lib/emacsen-common/packages/compat/package if present * All maintainer scripts test for existance of /var/lib/emacsen-common/state/package/installed/emacsen-common as mandated by policy. * Generate and install preinst maintainer script if needed. --- autoscripts/postinst-emacsen | 4 ++-- autoscripts/preinst-emacsen | 5 +++++ autoscripts/prerm-emacsen | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 autoscripts/preinst-emacsen (limited to 'autoscripts') diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen index f80e1dbd..6a46d79f 100644 --- a/autoscripts/postinst-emacsen +++ b/autoscripts/postinst-emacsen @@ -1,4 +1,4 @@ -if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ] +if [ "$1" = "configure" ] && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ] then - /usr/lib/emacsen-common/emacs-package-install #PACKAGE# + /usr/lib/emacsen-common/emacs-package-install --postinst #PACKAGE# fi diff --git a/autoscripts/preinst-emacsen b/autoscripts/preinst-emacsen new file mode 100644 index 00000000..780fc697 --- /dev/null +++ b/autoscripts/preinst-emacsen @@ -0,0 +1,5 @@ +if ( [ "$1" = "install" ] || [ "$1" = "upgrade" ] ) \ + && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ] +then + /usr/lib/emacsen-common/emacs-package-install --preinst #PACKAGE# +fi diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen index 8c3ca64c..31ecfaa4 100644 --- a/autoscripts/prerm-emacsen +++ b/autoscripts/prerm-emacsen @@ -1,3 +1,3 @@ -if [ -x /usr/lib/emacsen-common/emacs-package-remove ] ; then - /usr/lib/emacsen-common/emacs-package-remove #PACKAGE# +if [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ] ; then + /usr/lib/emacsen-common/emacs-package-remove --prerm #PACKAGE# fi -- cgit v1.2.3