diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-08-02 14:32:59 -0400 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-08-02 14:32:59 -0400 |
commit | b556f15076ac7ddfc503bca2fceceee3c2759a88 (patch) | |
tree | 57b7770fb2f7b7731403505f0da38d458a34dbe2 /elpa.pm.in | |
parent | be6a4385e1393eb6f3709903e0f4146d47c91e17 (diff) |
add dh-elpa-Version: binary package field
There is a debhelper mechanism for dh_* tools to embed their versions
in generated maintscripts, but our emacsen-common maintscripts are not
true maintscripts, so we can't use that mechanism.
Using a binary package field makes it possible for us to find packages
that need rebuilding without looking inside the contents of any binary
packages.
Diffstat (limited to 'elpa.pm.in')
-rwxr-xr-x | elpa.pm.in | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/elpa.pm.in b/elpa.pm.in new file mode 100755 index 0000000..0e1f1e9 --- /dev/null +++ b/elpa.pm.in @@ -0,0 +1,31 @@ +#!/usr/bin/perl +# debhelper sequence file for dh_elpa script + +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; +use Dpkg::Version; +use Module::Metadata; +use Config::Tiny; + +insert_after("dh_install", "dh_elpa"); + +add_command_options("dh_gencontrol", "--", "-Ddh-elpa-Version=@HELPER_VERSION@"); + +# check dh_make_perl version is new enough for dh_elpa_test +my $info = Module::Metadata->new_from_module("Debian::Control"); +my $version = Dpkg::Version->new($info->version()); + +my $options; +$options = Config::Tiny->read( "debian/elpa-test" ) + if ( -f "debian/elpa-test" ); + +if ( $version >= "0.90" + && !defined $options->{_}->{ "disable" } + && !defined $ENV{ 'DH_ELPA_TEST_DISABLE' } + ) { + insert_after("dh_auto_test", "dh_elpa_test"); + remove_command("dh_auto_test"); +} + +1; |