From 3c36c2532c3907f0a315d9010654176e8e9fc319 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 20 Jun 2002 01:31:47 +0000 Subject: r532: * 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. --- Debian/Debhelper/Dh_Getopt.pm | 2 ++ Debian/Debhelper/Dh_Lib.pm | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'Debian') 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. -- cgit v1.2.3