summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Lib.pm8
-rw-r--r--debhelper.15
-rw-r--r--debian/changelog8
-rwxr-xr-xdh_gencontrol5
-rwxr-xr-xdh_testdir2
5 files changed, 23 insertions, 5 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 5373e808..4140642b 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -383,6 +383,10 @@ sub filearray {
}
}
+sub getcontrol {
+ return $ENV{DH_CONTROL} || 'debian/control';
+}
+
# Returns a list of packages in the control file.
# Must pass "arch" or "indep" or "same" to specify arch-dependant or
# -independant or same arch packages. If nothing is specified, returns all
@@ -401,8 +405,8 @@ sub GetPackages {
my $package="";
my $arch="";
my @list=();
- open (CONTROL,"<debian/control") ||
- error("cannot read debian/control: $!\n");
+ open (CONTROL, getcontrol()) ||
+ error("cannot read ".getcontrol().": $!\n");
while (<CONTROL>) {
chomp;
s/\s+$//;
diff --git a/debhelper.1 b/debhelper.1
index b5902d35..b27bfcfb 100644
--- a/debhelper.1
+++ b/debhelper.1
@@ -250,6 +250,11 @@ run. If you use DH_OPTIONS, be sure to use "dh_testversion 1.1.17" - older
debhelpers will ignore it and do things you don't want them to. One very
good way to set DH_OPTIONS is by using "Target-specific Variable Values" in
your debian/rules file. See the make documentation for details on doing this.
+.TP
+.I DH_CONTROL
+Use the filename contained in this environment variable instead of
+debian/control, for everything debhelper does that involves
+debian/control. If you need this, you know who you are.
.SH "SEE ALSO"
.TP
.BR /usr/share/doc/debhelper/examples/
diff --git a/debian/changelog b/debian/changelog
index 4897016d..9fdbd42c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (2.2.15) unstable; urgency=medium
+
+ * Added the ability to make debhelper read a different file than
+ debian/control as the control file. This is very useful for various and
+ sundry things, all Evil, most involving kernel packages.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 24 Jan 2001 17:33:46 -0800
+
debhelper (2.2.14) unstable; urgency=medium
* Corrected globbing issue with dh_movefiles in v3 mode. Closes: #81431
diff --git a/dh_gencontrol b/dh_gencontrol
index 15e08203..0c03dfce 100755
--- a/dh_gencontrol
+++ b/dh_gencontrol
@@ -19,8 +19,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
# Generate and install control file.
- doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
- "-Tdebian/${EXT}substvars","-P$TMP",@{$dh{U_PARAMS}});
+ doit("dpkg-gencontrol","-c".Debian::Debhelper::Dh_Lib::getcontrol(),
+ "-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");
diff --git a/dh_testdir b/dh_testdir
index 8bd960d3..0bf917ae 100755
--- a/dh_testdir
+++ b/dh_testdir
@@ -7,7 +7,7 @@
use Debian::Debhelper::Dh_Lib;
init();
-foreach $file ('debian/control',@ARGV) {
+foreach $file (Debian::Debhelper::Dh_Lib::getcontrol(),@ARGV) {
if (! -e $file) {
error("\"$file\" not found. Are you sure you are in the correct directory?");
}