summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--debian/control1
-rwxr-xr-xelpa.pm9
3 files changed, 11 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 4cec281..1897ac2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dh-elpa (0.0.22) UNRELEASED; urgency=medium
[ Sean Whitton ]
+ * Backport prep
+ - Add check for dh-make-perl version before invoking dh_elpa_test
* Globs in DH_ELPA_TEST_ERT_EXCLUDE will now be matched against the full
paths to files (relative to the root of the source package).
Previously, only the basename was matched, so it was not possible to
diff --git a/debian/control b/debian/control
index cb23c10..e0a8912 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Depends:
emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
libarray-utils-perl,
libfile-find-rule-perl,
+ libdpkg-perl,
libtext-glob-perl,
${misc:Depends},
${perl:Depends},
diff --git a/elpa.pm b/elpa.pm
index cd0dfd2..121548b 100755
--- a/elpa.pm
+++ b/elpa.pm
@@ -4,10 +4,17 @@
use warnings;
use strict;
use Debian::Debhelper::Dh_Lib;
+use Dpkg::Version;
+use Module::Metadata;
insert_after("dh_install", "dh_elpa");
-unless ( defined $ENV{ 'DH_ELPA_TEST_DISABLE' } ) {
+# check dh_make_perl version is new enough for dh_elpa_test
+my $info = Module::Metadata->new_from_module("DhMakePerl");
+my $version = Dpkg::Version->new($info->version());
+
+if ( !defined $ENV{ 'DH_ELPA_TEST_DISABLE' }
+ && $version >= 0.90 ) {
insert_after("dh_auto_test", "dh_elpa_test");
remove_command("dh_auto_test");
}