summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm2
-rw-r--r--Debian/Debhelper/Dh_Lib.pm9
-rw-r--r--debhelper.pod7
-rw-r--r--debian/changelog9
-rwxr-xr-xdh_gencontrol8
5 files changed, 30 insertions, 5 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 16851a04..37d6f475 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -141,6 +141,8 @@ sub parseopts {
"autodest" => \$options{AUTODEST},
"h|help" => \&showhelp,
+
+ "mainpackage=s" => \$options{MAINPACKAGE},
"<>" => \&NonOption,
);
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index d1c67b53..f22e8171 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -72,10 +72,13 @@ sub init {
$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.
diff --git a/debhelper.pod b/debhelper.pod
index 7cf755c0..dae701c9 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -113,6 +113,13 @@ the package as one that should be acted on.
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
diff --git a/debian/changelog b/debian/changelog
index 5e335939..b26894cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+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.
diff --git a/dh_gencontrol b/dh_gencontrol
index fcb91845..941c9a8c 100755
--- a/dh_gencontrol
+++ b/dh_gencontrol
@@ -53,8 +53,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
# 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.