From 2f12a3b0f500152380daf9f8a3868ff9e3403636 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 13 Nov 2001 11:07:08 +0000 Subject: Generalize DH_COMPAT for various Debian build levels. --- Construct | 8 ++++++-- debian/rules | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Construct b/Construct index 4adeade..1c0ef75 100644 --- a/Construct +++ b/Construct @@ -59,6 +59,10 @@ $jw = cons::whereis('jw'); $dh_builddeb = cons::whereis('dh_builddeb'); $fakeroot = cons::whereis('fakeroot'); +# My installation on Red Hat doesn't like any debhelper version +# beyond 2, so let's use 2 as the default on any non-Debian build. +$DH_COMPAT = (-f "/etc/debian_version") ? 3 : 2; + # # Now grab the information that we "build" into the files (using sed). # @@ -335,7 +339,7 @@ if ($dh_builddeb && $fakeroot){ map("build/script/$_", @script_files), qq(rm -rf build/engine/build build/engine/dist rm -rf build/script/build build/script/dist - fakeroot make -f debian/rules ENVOKED_BY_CONSTRUCT=1 binary - env DH_COMPAT=3 dh_clean + fakeroot make -f debian/rules DH_COMPAT=$DH_COMPAT ENVOKED_BY_CONSTRUCT=1 binary + env DH_COMPAT=$DH_COMPAT dh_clean )); } diff --git a/debian/rules b/debian/rules index 6e52b59..38f5a8b 100644 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,11 @@ #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=3 +# We expect this to be provided by the calling build script: +export DH_COMPAT +# Here's the previous/"normal" Debian value (?), but it breaks on a +# converted Red Hat debhelper installation: +#export DH_COMPAT=3 # This has to be exported to make some magic below work. export DH_OPTIONS -- cgit v0.12