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. --- dh_installemacsen | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'dh_installemacsen') diff --git a/dh_installemacsen b/dh_installemacsen index 92037f20..b2ee1426 100755 --- a/dh_installemacsen +++ b/dh_installemacsen @@ -19,15 +19,20 @@ B is a debhelper program that is responsible for installing files used by the Debian B package into package build directories. -It also automatically generates the F and F commands needed to -register a package as an Emacs add on package. The commands are added to -the maintainer scripts by B. See L -for an explanation of how this works. +It also automatically generates the F F and F +commands needed to register a package as an Emacs add on package. The commands +are added to the maintainer scripts by B. See +L for an explanation of how this works. =head1 FILES =over 4 +=item debian/I.emacsen-compat + +Installed into F in the +package build directory. + =item debian/I.emacsen-install Installed into F in the @@ -83,15 +88,23 @@ if (! defined $dh{FLAVOR}) { $dh{FLAVOR}='emacs'; } -# PROMISE: DH NOOP WITHOUT emacsen-install emacsen-remove emacsen-startup +# PROMISE: DH NOOP WITHOUT emacsen-common emacsen-install emacsen-remove emacsen-startup foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); + my $emacsen_compat=pkgfile($package,"emacsen-compat"); my $emacsen_install=pkgfile($package,"emacsen-install"); my $emacsen_remove=pkgfile($package,"emacsen-remove"); my $emacsen_startup=pkgfile($package,"emacsen-startup"); + if ($emacsen_compat ne '') { + if (! -d "$tmp/usr/lib/emacsen-common/packages/compat") { + doit("install","-d","$tmp/usr/lib/emacsen-common/packages/compat"); + } + doit("install","-m0644",$emacsen_compat,"$tmp/usr/lib/emacsen-common/packages/compat/$package"); + } + if ($emacsen_install ne '') { if (! -d "$tmp/usr/lib/emacsen-common/packages/install") { doit("install","-d","$tmp/usr/lib/emacsen-common/packages/install"); @@ -115,6 +128,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if ($emacsen_install ne '' || $emacsen_remove ne '') { if (! $dh{NOSCRIPTS}) { + autoscript($package,"preinst","preinst-emacsen", + "s/#PACKAGE#/$package/"); autoscript($package,"postinst","postinst-emacsen", "s/#PACKAGE#/$package/"); autoscript($package,"prerm","prerm-emacsen", @@ -126,6 +141,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { =head1 SEE ALSO L +L This program is a part of debhelper. -- cgit v1.2.3