File: dh_gencontrol

package info (click to toggle)
debhelper 2.0.86
  • links: PTS
  • area: main
  • in suites: potato
  • size: 616 kB
  • ctags: 49
  • sloc: perl: 1,842; makefile: 251; sh: 5
file content (30 lines) | stat: -rwxr-xr-x 786 bytes parent folder | download
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
#!/usr/bin/perl -w
#
# Generate and install the control file. Simple dpkg-gencontrol wrapper.

BEGIN { push @INC, "debian", "/usr/share/debhelper" }
use Dh_Lib;
init();

foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
	$TMP=tmpdir($PACKAGE);
	$EXT=pkgext($PACKAGE);
	
	$changelog=pkgfile($PACKAGE,'changelog');
	if (! $changelog) {
		$changelog='debian/changelog';
	}

	if ( ! -d '$TMP/DEBIAN' ) {
		doit("install","-o","root","-g","root","-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","root.root","$TMP/DEBIAN/control");
}