"autodest" => \$options{AUTODEST},
"h|help" => \&showhelp,
+
+ "mainpackage=s" => \$options{MAINPACKAGE},
"<>" => \&NonOption,
);
$dh{NO_ACT}=1;
}
- # Get the name of the main binary package (first one listed in
- # debian/control).
my @allpackages=GetPackages();
- $dh{MAINPACKAGE}=$allpackages[0];
+ # Get the name of the main binary package (first one listed in
+ # debian/control). Only if the main package was not set on the
+ # command line.
+ if (! exists $dh{MAINPACKAGE} || ! defined $dh{MAINPACKAGE}) {
+ $dh{MAINPACKAGE}=$allpackages[0];
+ }
# Check if packages to build have been specified, if not, fall back to
# the default, doing them all.
Use "tmpdir" for package build directory. The default is debian/<package>
+=item B<--mainpackage=>I<package>
+
+This little-used option changes the package which debhelper considers the
+"main package", that is, the first one listed in debian/control, and the
+one for which debian/foo files can be used instead of the usual
+debian/package.foo files.
+
=back
=head1 COMMON DEBHELPER OPTIONS
+debhelper (4.0.13) unstable; urgency=low
+
+ * Added --mainpackage= option, of use in some kernel modules packages.
+ * dh_gencontrol only needs to pass -p to dpkg-gencontrol if there is more
+ than one package in debian/control. This makes it a bit more flexible in
+ some cases.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 19 Jun 2002 19:44:12 -0400
+
debhelper (4.0.12) unstable; urgency=low
* Fixed debconf-utils dependency.
}
# Generate and install control file.
- doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
- "-Tdebian/${ext}substvars", "-P$tmp",@{$dh{U_PARAMS}});
+ my @command="dpkg-gencontrol";
+ if (GetPackages() > 1) {
+ push @command, "-p$package";
+ }
+ doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars",
+ "-P$tmp",@{$dh{U_PARAMS}});
# This chmod is only necessary if the user sets the umask to
# something odd.