Generalize DH_COMPAT for various Debian build levels.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 13 Nov 2001 11:07:08 +0000 (11:07 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 13 Nov 2001 11:07:08 +0000 (11:07 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@116 fdb21ef1-2011-0410-befe-b5e4ea1792b1

Construct
debian/rules

index 4adeadeefe9512f4ac3dc83f81ad9f3626fb0ed9..1c0ef75187e314b5cf58e070fe0d24a969d10a94 100644 (file)
--- 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
     ));
 }
index 6e52b59f08c17cc6c4967a77368d70d52b196fef..38f5a8bc59365df607d61680cb46f580285122f6 100644 (file)
 #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