3 # Generate and install the control file. Simple dpkg-gencontrol wrapper.
5 BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
9 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10 $TMP=tmpdir($PACKAGE);
11 $EXT=pkgext($PACKAGE);
13 $changelog=pkgfile($PACKAGE,'changelog');
15 $changelog='debian/changelog';
18 if ( ! -d '$TMP/DEBIAN' ) {
19 doit("install","-o","root","-g","root","-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","root.root","$TMP/DEBIAN/control");