return $fn;
}
+# Pass in a number, will return true iff the current compatability level
+# is equal to that number.
+sub compat {
+ my $num=shift;
+
+ my $c=1;
+ if (defined $ENV{DH_COMPAT}) {
+ $c=$ENV{DH_COMPAT};
+ }
+
+ return ($c == $num);
+}
+
# Pass it a name of a binary package, it returns the name of the tmp dir to
# use, for that package.
-# This is for back-compatability with the debian/tmp tradition.
sub tmpdir { my $package=shift;
if ($dh{TMPDIR}) {
return $dh{TMPDIR};
}
- elsif ($package eq $dh{MAINPACKAGE}) {
+ elsif (compat(1) && $package eq $dh{MAINPACKAGE}) {
+ # This is for back-compatability with the debian/tmp tradition.
return "debian/tmp";
}
else {
.I DH_VERBOSE
Enables verbose mode.
.TP
+.I DH_COMPAT
+Specifies what compatability level debhelper should run at. The default is 1,
+which makes debhelper behave in a manner compatable with the 1.x series of
+debhelper. If set to 2, debhelper's behavior will change to use the new
+features of the 2.x series. Use this with caution, as the 2.x series makes
+major changes that will break most packages. For documentation on these
+changes, read /usr/doc/debhelper/v2
+.TP
.I DH_NO_ACT
Enables no-act mode.
.TP
+debhelper (1.9.00) unstable; urgency=low
+
+ * This is a release of debhelper in preparation for debhelper v2.
+ * doc/v2: added, documented status of v2 changes.
+ * README: mention doc/v2
+ * debhelper.1: docuimented DH_COMPAT
+ * examples/*: added DH_COMAPT=1 to top of rules files
+
+ -- Joey Hess <joeyh@master.debian.org> Thu, 1 Jul 1999 13:16:41 -0700
+
debhelper (1.2.83) unstable; urgency=medium
* dh_perl: fixed substvars typo. Urgency medium since a lot of people will
name of the tmp directory that will be used as this package's
package build directory. Typically, this will be "debian/tmp" or
"debian/package".
+compat()
+ Pass this command a number, and if the current compatability level
+ equals that number, it will return true. Looks at DH_COMPAT to get
+ the compatability level.
pkgfile()
Pass this command the name of a binary package, and the base name of a
file, and it will return the actual filename to use. This is used
For a more gentle introduction, the maint-guide debian package contains a
tutorial about making your first package using Debhelper.
+Debhelper v2:
+------------
+
+Debhelper v2 is a major new version of Debhelper, still under development.
+Debhelper will continue to work in v1 compatability mode for now, if you're
+interested in trying the new versiln, read the file named "v2".
+
Starting a new package:
----------------------
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+# This is the debhelper compatability version to use.
+export DH_COMPAT=1
+
build: build-stamp
build-stamp:
dh_testdir
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+# This is the debhelper compatability version to use.
+export DH_COMPAT=1
+
build: build-stamp
build-stamp:
dh_testdir