[perl-openssl-defaults] 02/05: Calculate the ABI version as a full debian/rules target file
ntyni at debian.org
ntyni at debian.org
Tue Dec 20 21:53:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch master
in repository perl-openssl-defaults.
commit d7dde158411a5d6a7f76b1c78cb28ba4ae0c4478
Author: Niko Tyni <ntyni at debian.org>
Date: Tue Dec 20 23:01:23 2016 +0200
Calculate the ABI version as a full debian/rules target file
This optimization saves objdump runs on targets like 'clean'
and 'install', and removes the need for having libssl-dev
installed in the 'clean' phase.
---
debian/clean | 1 +
debian/rules | 25 +++++++++++++------------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/debian/clean b/debian/clean
index 1f113a0..8771ef1 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,2 +1,3 @@
debian/dh_perl_openssl.1
debian/perl-openssl.make
+debian/openssl-abiversion
diff --git a/debian/rules b/debian/rules
index 4a189b6..096516d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,11 +11,17 @@ SOFILE = /usr/lib/$(DEB_HOST_MULTIARCH)/libssl.so
# it is used for the Provides: perl-openssl-abi-XX relationship
# see #848113
-OPENSSL_ABI_VERSION=$(shell $(OBJDUMP) -p $(SOFILE) | perl -ne '/SONAME\s+libssl\.so\.(.+)/ and print $$1')
+debian/openssl-abiversion: $(SOFILE)
+ $(OBJDUMP) -p $< | perl -ne '/SONAME\s+libssl\.so\.(.+)/ and print $$1' > $@
+ # fail if we could not extract the SONAME
+ [ -s $@ ]
-ifeq (,$(OPENSSL_ABI_VERSION))
- $(error Cannot determine ABI version from $(SOFILE) SONAME)
-endif
+debian/perl-openssl.make: debian/openssl-abiversion
+ printf "%s\n%s\n%s\n" \
+ "# the ABI version for generating a perl-openssl-abi-* dependency." \
+ "# See #848113." \
+ "PERL_OPENSSL_ABI_VERSION=$(shell cat $<)" \
+ > $@
# we build a binary called 'openssl-version' just to be able to generate
# a libssl* dependency. dh_shlibdeps won't run if nothing in installed
@@ -24,15 +30,10 @@ override_dh_shlibdeps:
# scanning uninstalled binaries is intentional, please ignore the warning
dpkg-shlibdeps -e$(CURDIR)/openssl-version -Tdebian/perl-openssl-defaults.substvars
-override_dh_gencontrol:
- dh_gencontrol -- -Vperl-openssl-abi-version=$(OPENSSL_ABI_VERSION)
+override_dh_gencontrol: debian/openssl-abiversion
+ dh_gencontrol -- -Vperl-openssl-abi-version=$(shell cat $<)
-override_dh_auto_build:
- printf "%s\n%s\n%s\n" \
- "# the ABI version for generating a perl-openssl-abi-* dependency." \
- "# See #848113." \
- "PERL_OPENSSL_ABI_VERSION=$(OPENSSL_ABI_VERSION)" \
- > debian/perl-openssl.make
+override_dh_auto_build: debian/perl-openssl.make
pod2man debian/dh_perl_openssl debian/dh_perl_openssl.1
CC=$(CC) dh_auto_build
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/perl-openssl-defaults.git
More information about the Pkg-perl-cvs-commits
mailing list