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 If a file named debian/package.menu exists, then it is installed into
22 usr/share/menu/package in the package build directory. This is a debian menu
23 file. See L<menufile(5)> for its format.
25 If a file named debian/package.menu-method exits, then it is installed into
26 etc/menu-methods/package in the package build directory. This is a debian
27 menu method file. In this case, dh_installmenu also automatically generates
28 the postinst and postrm commands needed to
29 interface with the debian menu package. These commands are inserted into
30 the maintainer scripts by dh_installdeb. See L<dh_installdeb(1)> for an
31 explanation of how this works.
37 =item B<-n>, B<--noscripts>
39 Do not modify postinst/postrm scripts.
47 foreach my $package (@{$dh{DOPACKAGES}}) {
48 my $tmp=tmpdir($package);
49 my $menu=pkgfile($package,"menu");
50 my $menu_method=pkgfile($package,"menu-method");
53 if (! -d "$tmp/usr/share/menu") {
54 doit("install","-d","$tmp/usr/share/menu");
56 doit("install","-p","-m644",$menu,"$tmp/usr/share/menu/$package");
59 if ($menu_method ne '') {
60 if (!-d "$tmp/etc/menu-methods") {
61 doit("install","-d","$tmp/etc/menu-methods");
63 doit("install","-p","-m644",$menu_method,"$tmp/etc/menu-methods/$package");
65 if (! $dh{NOSCRIPTS}) {
66 autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
67 autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
78 This program is a part of debhelper.
82 Joey Hess <joeyh@debian.org>