5 dh_installmenu - install debian menu files into package build directories
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_installmenu> [S<B<debhelper options>>] [B<-n>]
18 dh_installmenu is a debhelper program that is responsible for installing
19 files used by the debian menu package into package build directories.
21 It also automatically generates the postinst and postrm commands needed to
22 interface with the debian menu package. These commands are inserted into
23 the maintainer scripts by L<dh_installdeb(1)>.
29 =item debian/I<package>.menu
31 Debian menu files, installed into usr/share/menu/I<package> in the package
32 build directory. See L<menufile(5)> for its format.
34 =item debian/I<package>.menu-method
36 Debian menu method files, installed into etc/menu-methods/I<package>
37 in the package build directory.
45 =item B<-n>, B<--noscripts>
47 Do not modify postinst/postrm scripts.
55 foreach my $package (@{$dh{DOPACKAGES}}) {
56 my $tmp=tmpdir($package);
57 my $menu=pkgfile($package,"menu");
58 my $menu_method=pkgfile($package,"menu-method");
61 if (! -d "$tmp/usr/share/menu") {
62 doit("install","-d","$tmp/usr/share/menu");
64 doit("install","-p","-m644",$menu,"$tmp/usr/share/menu/$package");
66 # Add the scripts if a menu-method file doesn't exist.
67 # The scripts for menu-method handle everything these do, too.
68 if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
69 autoscript($package,"postinst","postinst-menu");
70 autoscript($package,"postrm","postrm-menu")
74 if ($menu_method ne '') {
75 if (!-d "$tmp/etc/menu-methods") {
76 doit("install","-d","$tmp/etc/menu-methods");
78 doit("install","-p","-m644",$menu_method,"$tmp/etc/menu-methods/$package");
80 if (! $dh{NOSCRIPTS}) {
81 autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
82 autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
93 This program is a part of debhelper.
97 Joey Hess <joeyh@debian.org>