3 # Generate and install the control file. Simple dpkg-gencontrol wrapper.
6 use Debian::Debhelper::Dh_Lib;
9 foreach my $package (@{$dh{DOPACKAGES}}) {
10 my $tmp=tmpdir($package);
11 my $ext=pkgext($package);
13 my $changelog=pkgfile($package,'changelog');
15 $changelog='debian/changelog';
18 if ( ! -d "$tmp/DEBIAN" ) {
19 doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
22 # Generate and install control file.
23 doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
24 "-Tdebian/${ext}substvars","-P$tmp",@{$dh{U_PARAMS}});
26 # This chmod is only necessary if the user sets the umask to something odd.
27 doit("chmod","644","$tmp/DEBIAN/control");
29 doit("chown","0.0","$tmp/DEBIAN/control");