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 dh_installdeb. See L<dh_installdeb(1)> for an
24 explanation of how this works.
26 If a file named debian/package.menu exists, then it is installed into
27 usr/share/menu/package in the package build directory. This is a debian menu
28 file. See L<menufile(5)> for its format.
30 If a file named debian/package.menu-method exits, then it is installed into
31 etc/menu-methods/package in the package build directory. This is a debian
38 =item B<-n>, B<--noscripts>
40 Do not modify postinst/postrm scripts.
48 foreach my $package (@{$dh{DOPACKAGES}}) {
49 my $tmp=tmpdir($package);
50 my $menu=pkgfile($package,"menu");
51 my $menu_method=pkgfile($package,"menu-method");
54 if (! -d "$tmp/usr/share/menu") {
55 doit("install","-d","$tmp/usr/share/menu");
57 doit("install","-p","-m644",$menu,"$tmp/usr/share/menu/$package");
59 # Add the scripts if a menu-method file doesn't exist.
60 # The scripts for menu-method handle everything these do, too.
61 if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
62 autoscript($package,"postinst","postinst-menu");
63 autoscript($package,"postrm","postrm-menu")
67 if ($menu_method ne '') {
68 if (!-d "$tmp/etc/menu-methods") {
69 doit("install","-d","$tmp/etc/menu-methods");
71 doit("install","-p","-m644",$menu_method,"$tmp/etc/menu-methods/$package");
73 if (! $dh{NOSCRIPTS}) {
74 autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
75 autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
86 This program is a part of debhelper.
90 Joey Hess <joeyh@debian.org>