summaryrefslogtreecommitdiff
path: root/dh_installmenu
diff options
context:
space:
mode:
authorjoey <joey>2001-02-09 00:57:53 +0000
committerjoey <joey>2001-02-09 00:57:53 +0000
commit053f6f8b4e7431d32511aef209188a084e8c7e79 (patch)
tree209a51c8c8fdbcce25c834198f1b3ef705dcb5b0 /dh_installmenu
parentae0346306694bb2c52193f6352755c223e6e8935 (diff)
r420: big monsta changes
Diffstat (limited to 'dh_installmenu')
-rwxr-xr-xdh_installmenu33
1 files changed, 17 insertions, 16 deletions
diff --git a/dh_installmenu b/dh_installmenu
index d6050fe..2f73209 100755
--- a/dh_installmenu
+++ b/dh_installmenu
@@ -2,43 +2,44 @@
#
# Integration with debian menu system:
#
-# If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE
+# If debian/menu file exists, save it to $tmp/usr/lib/menu/$package
# If debian/menu-method file exists, save it to
-# $TMP/etc/menu-methods/$PACKAGE
+# $tmp/etc/menu-methods/$package
#
# Also, add to postinst and postrm.
+use strict;
use Debian::Debhelper::Dh_Lib;
init();
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
- $TMP=tmpdir($PACKAGE);
- $menu=pkgfile($PACKAGE,"menu");
- $menu_method=pkgfile($PACKAGE,"menu-method");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $tmp=tmpdir($package);
+ my $menu=pkgfile($package,"menu");
+ my $menu_method=pkgfile($package,"menu-method");
if ($menu ne '') {
- if (! -d "$TMP/usr/lib/menu") {
- doit("install","-d","$TMP/usr/lib/menu");
+ if (! -d "$tmp/usr/lib/menu") {
+ doit("install","-d","$tmp/usr/lib/menu");
}
- doit("install","-p","-m644",$menu,"$TMP/usr/lib/menu/$PACKAGE");
+ doit("install","-p","-m644",$menu,"$tmp/usr/lib/menu/$package");
# Add the scripts if a menu-method file doesn't exist.
# The scripts for menu-method handle everything these do, too.
if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
- autoscript($PACKAGE,"postinst","postinst-menu");
- autoscript($PACKAGE,"postrm","postrm-menu")
+ autoscript($package,"postinst","postinst-menu");
+ autoscript($package,"postrm","postrm-menu")
}
}
if ($menu_method ne '') {
- if (!-d "$TMP/etc/menu-methods") {
- doit("install","-d","$TMP/etc/menu-methods");
+ if (!-d "$tmp/etc/menu-methods") {
+ doit("install","-d","$tmp/etc/menu-methods");
}
- doit("install","-p",$menu_method,"$TMP/etc/menu-methods/$PACKAGE");
+ doit("install","-p",$menu_method,"$tmp/etc/menu-methods/$package");
if (! $dh{NOSCRIPTS}) {
- autoscript($PACKAGE,"postinst","postinst-menu-method","s/#PACKAGE#/$PACKAGE/");
- autoscript($PACKAGE,"postrm","postrm-menu-method","s/#PACKAGE#/$PACKAGE/");
+ autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
+ autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
}
}
}