From 85f9e790a4c381af2449ae933ba0dd168837223e Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 18 Aug 2018 16:59:25 -0300 Subject: initial support for ELPA_NAME This should allow non elpa-$foo binary packages. It needs to be documented. --- debian/changelog | 6 +++++- debian/rules | 2 ++ dh_elpa.in | 11 ++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index f1a323f..6b0555b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ dh-elpa (1.14) UNRELEASED; urgency=medium + [ Nicholas D Steeves ] * Update Maintainer team name and email address. * Update Vcs links to point to salsa project. * Update watch file to check salsa instead of anonscm.debian.org - -- Nicholas D Steeves Tue, 22 May 2018 15:01:48 -0400 + [ David Bremner ] + * Add support for ELPA_NAME environment variable (Closes: #905464). + + -- David Bremner Sat, 18 Aug 2018 16:55:37 -0300 dh-elpa (1.13) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index b5558f4..232b01a 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,8 @@ include /usr/share/dpkg/pkg-info.mk export DEB_VERSION_UPSTREAM DESTDIR=$(CURDIR)/debian/tmp +# this is not needed, and only included as a test of the feature. +ELPA_NAME_dh-elpa=dh-elpa %: dh $@ diff --git a/dh_elpa.in b/dh_elpa.in index 69873d1..9ff665e 100755 --- a/dh_elpa.in +++ b/dh_elpa.in @@ -182,9 +182,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); my $file=pkgfile($package,"elpa"); - my $elpapkg=$package; - # TODO do this more sanely or at least allow an override - $elpapkg =~ s/^elpa-//; + my $varname="ELPA_NAME_${package}"; + my $elpapkg = $ENV{$varname} || $ENV{ELPA_NAME}; + if (!defined($elpapkg)) { + verbose_print("Guessing elpa package name from package name $package"); + + $elpapkg = $package; + $elpapkg =~ s/^elpa-//; + } verbose_print("Using elpa package name $elpapkg"); my @files; -- cgit v1.2.3