#!/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"); }