diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-14 14:25:07 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-14 14:25:07 -0400 |
commit | 692ac0f0d2b7acc570cd6a5f8cac848109daf026 (patch) | |
tree | 595da5b949e88f2e05c44cf755f007dc5bdc2465 /Debian/Debhelper/Dh_Lib.pm | |
parent | 9803d8bb635132458142416d32273c9c754b2aca (diff) | |
parent | 61aa7954cd6c8620ca99a0d7895aa5a6f59d37e0 (diff) |
Merge branch 'master' into buildsystems
Conflicts:
debian/changelog
dh_auto_configure
Diffstat (limited to 'Debian/Debhelper/Dh_Lib.pm')
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index c80389d7..28a90f7b 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -347,12 +347,15 @@ sub tmpdir { # # It tries several filenames: # * debian/package.filename.buildarch +# * debian/package.filename.buildos # * debian/package.filename -# * debian/file (if the package is the main package) -# If --name was specified then tonly the first two are tried, and they must -# have the name after the pacage name: +# * debian/filename (if the package is the main package) +# If --name was specified then the files +# must have the name after the package name: # * debian/package.name.filename.buildarch +# * debian/package.name.filename.buildos # * debian/package.name.filename +# * debian/name.filename (if the package is the main package) sub pkgfile { my $package=shift; my $filename=shift; @@ -362,6 +365,7 @@ sub pkgfile { } my @try=("debian/$package.$filename.".buildarch(), + "debian/$package.$filename.".buildos(), "debian/$package.$filename"); if ($package eq $dh{MAINPACKAGE}) { push @try, "debian/$filename"; @@ -621,6 +625,19 @@ sub dpkg_architecture_value { } } +# Returns the build OS. (Memoized) +{ + my $os; + + sub buildos { + return $os if defined $os; + + $os=`dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null` || error("dpkg-architecture failed"); + chomp $os; + return $os; + } +} + # Passed an arch and a list of arches to match against, returns true if matched sub samearch { my $arch=shift; |