5 dh_gencontrol - generate and install control file
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_gencontrol> [S<I<debhelper options>>] [S<B<--> I<params>>]
18 dh_gencontrol is a debhelper program that is responsible for generating
19 control files, and installing them into the DEBIAN directory with the
22 This program is merely a wrapper around L<dpkg-gencontrol(1)>, which calls
23 it once for each package being acted on, and passes in some additional
24 useful flags including "-isp".
30 =item B<-u>I<params>, B<--dpkg-gencontrol-params>I<params>
34 Pass "params" to L<dpkg-gencontrol(1)>.
42 foreach my $package (@{$dh{DOPACKAGES}}) {
43 my $tmp=tmpdir($package);
44 my $ext=pkgext($package);
46 my $changelog=pkgfile($package,'changelog');
48 $changelog='debian/changelog';
51 if ( ! -d "$tmp/DEBIAN" ) {
52 doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
55 # Generate and install control file.
56 my @command="dpkg-gencontrol";
57 if (GetPackages() > 1) {
58 push @command, "-p$package";
60 doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars",
61 "-P$tmp",@{$dh{U_PARAMS}});
63 # This chmod is only necessary if the user sets the umask to
65 doit("chmod","644","$tmp/DEBIAN/control");
67 doit("chown","0.0","$tmp/DEBIAN/control");
74 This program is a part of debhelper.
78 Joey Hess <joeyh@debian.org>