1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/perl -w
#
# Generate and install the control file. Simple dpkg-gencontrol wrapper.
use strict;
use Debian::Debhelper::Dh_Lib;
init();
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $ext=pkgext($package);
my $changelog=pkgfile($package,'changelog');
if (! $changelog) {
$changelog='debian/changelog';
}
if ( ! -d "$tmp/DEBIAN" ) {
doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
}
# Generate and install control file.
doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
"-Tdebian/${ext}substvars","-P$tmp",@{$dh{U_PARAMS}});
# This chmod is only necessary if the user sets the umask to something odd.
doit("chmod","644","$tmp/DEBIAN/control");
doit("chown","0.0","$tmp/DEBIAN/control");
}
|