summaryrefslogtreecommitdiff
path: root/dh_testversion
diff options
context:
space:
mode:
authorjoey <joey>2001-02-10 00:33:08 +0000
committerjoey <joey>2001-02-10 00:33:08 +0000
commit4f16c9baca4edbe95d7e9932b28e12ebeda14506 (patch)
treedb7b3451adeafe48735fa2548d33dd68db1a6a6a /dh_testversion
parent7aa17bd59d40345ba72ab5c31b6c72e4448d5007 (diff)
r439: attack of the pod people from the planet perl is complete
Diffstat (limited to 'dh_testversion')
-rwxr-xr-xdh_testversion62
1 files changed, 60 insertions, 2 deletions
diff --git a/dh_testversion b/dh_testversion
index 8f25214..93832c1 100755
--- a/dh_testversion
+++ b/dh_testversion
@@ -1,9 +1,55 @@
#!/usr/bin/perl -w
-#
-# Debhelper version check.
+
+=head1 NAME
+
+dh_testversion - ensure that the correct version of debhelper is installed
+
+=cut
use Debian::Debhelper::Dh_Lib;
use Debian::Debhelper::Dh_Version; # contains the version number of debhelper.
+
+=head1 SYNOPSIS
+
+ dh_testversion [debhelper options] [operator] [version]
+
+=head1 DESCRIPTION
+
+Note: This program is deprecated. You should use build dependencies
+instead.
+
+dh_testversion compares the version of debhelper against the version you
+specify, and if the condition is not met, exits with an error message.
+
+You can use this in your debian/rules files if a new debhelper feature is
+introduced, and your package requires that feature to build correctly. Use
+debhelper's changelog to figure out the version you need.
+
+Be sure not to overuse dh_testversion. If debhelper version 9.5
+introduces a new dh_autofixbugs command, and your package uses it, then if
+someone tries to build it with debhelper 1.0, the build will fail anyway when
+dh_autofixbugs cannot be found, so there is no need for you to use
+dh_testversion.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<operator>
+
+Optional comparison operator used in comparing the versions. If not
+specified, ">=" is used. For descriptions of the comparison operators, see
+dpkg --help.
+
+=item I<version>
+
+Version number to compare against the current version of debhelper. If not
+specified, dh_testversion does nothing.
+
+=back
+
+=cut
+
init();
my($compare, $ver);
@@ -21,3 +67,15 @@ if (defined $compare and defined $ver) {
system('dpkg','--compare-versions',$Debian::Debhelper::Dh_Version::version,$compare,$ver) == 0 ||
error("debhelper version $Debian::Debhelper::Dh_Version::version is installed, but a version $compare $ver is needed to build this package.");
}
+
+=head1 SEE ALSO
+
+L<debhelper(1)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut