3 # Generate and install the control file. Simple dpkg-gencontrol wrapper.
5 use Debian::Debhelper::Dh_Lib;
8 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10 $EXT=pkgext($PACKAGE);
12 $changelog=pkgfile($PACKAGE,'changelog');
14 $changelog='debian/changelog';
17 if ( ! -d '$TMP/DEBIAN' ) {
18 doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
21 # Generate and install control file.
22 doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
23 "-Tdebian/$EXT\substvars","-P$TMP",@{$dh{U_PARAMS}});
25 # This chmod is only necessary if the user sets the umask to something odd.
26 doit("chmod","644","$TMP/DEBIAN/control");
28 doit("chown","root.root","$TMP/DEBIAN/control");