From 22f357929aa7b05ceb554b8cb0d2488703ac0440 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 13 Nov 2001 11:07:08 +0000 Subject: [PATCH] Generalize DH_COMPAT for various Debian build levels. git-svn-id: http://scons.tigris.org/svn/scons/trunk@116 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- Construct | 8 ++++++-- debian/rules | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Construct b/Construct index 4adeadee..1c0ef751 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 6e52b59f..38f5a8bc 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 -- 2.26.2