diff options
Diffstat (limited to 'dh_installemacsen')
-rwxr-xr-x | dh_installemacsen | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/dh_installemacsen b/dh_installemacsen index 26a2fc75..2e19c1f6 100755 --- a/dh_installemacsen +++ b/dh_installemacsen @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B<dh_installemacsen> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [B<--flavor=>I<foo>] @@ -55,7 +57,7 @@ build directory. Use B<--priority> to use a different priority than 50. =over 4 -=item B<-n>, B<--noscripts> +=item B<-n>, B<--no-scripts> Do not modify F<postinst>/F<prerm> scripts. @@ -100,42 +102,34 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $emacsen_startup=pkgfile($package,"emacsen-startup"); if ($emacsen_compat ne '') { - if (! -d "$tmp/usr/lib/emacsen-common/packages/compat") { - install_dir("$tmp/usr/lib/emacsen-common/packages/compat"); - } + install_dir("$tmp/usr/lib/emacsen-common/packages/compat"); install_file($emacsen_compat, "$tmp/usr/lib/emacsen-common/packages/compat/$package"); } if ($emacsen_install ne '') { - if (! -d "$tmp/usr/lib/emacsen-common/packages/install") { - install_dir("$tmp/usr/lib/emacsen-common/packages/install"); - } + install_dir("$tmp/usr/lib/emacsen-common/packages/install"); install_prog($emacsen_install,"$tmp/usr/lib/emacsen-common/packages/install/$package"); } if ($emacsen_remove ne '') { - if (! -d "$tmp/usr/lib/emacsen-common/packages/remove") { - install_dir("$tmp/usr/lib/emacsen-common/packages/remove"); - } + install_dir("$tmp/usr/lib/emacsen-common/packages/remove"); install_prog("$emacsen_remove","$tmp/usr/lib/emacsen-common/packages/remove/$package"); } if ($emacsen_startup ne '') { - if (! -d "$tmp/etc/$dh{FLAVOR}/site-start.d/") { - install_dir("$tmp/etc/$dh{FLAVOR}/site-start.d/"); - } + install_dir("$tmp/etc/$dh{FLAVOR}/site-start.d/"); install_file($emacsen_startup,"$tmp/etc/$dh{FLAVOR}/site-start.d/$dh{PRIORITY}$package.el"); } if ($emacsen_install ne '' || $emacsen_remove ne '') { if (! $dh{NOSCRIPTS}) { autoscript($package,"preinst","preinst-emacsen", - "s/#PACKAGE#/$package/g"); + { 'PACKAGE' => $package }); autoscript($package,"postinst","postinst-emacsen", - "s/#PACKAGE#/$package/g"); + { 'PACKAGE' => $package }); autoscript($package,"prerm","prerm-emacsen", - "s/#PACKAGE#/$package/g"); + { 'PACKAGE' => $package }); } } } @@ -152,9 +146,3 @@ This program is a part of debhelper. Joey Hess <joeyh@debian.org> =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: |