[libmodule-extractuse-perl] 01/05: Fix (hopefully) a reproducible build issue.

gregor herrmann gregoa at debian.org
Mon Sep 21 21:03:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libmodule-extractuse-perl.

commit 4bf17d1e76baf58a6ac06eee6d7ec858094d8e99
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Sep 21 22:54:46 2015 +0200

    Fix (hopefully) a reproducible build issue.
    
    debian/rules: make sure that the recreated grammar file gets installed and
    not the shipped one.
    
    The problem is that (1) recompilation happens too late and (2) is repeated
    which can help if the timing is right.
    
    Now we move the shipped file away and install the freshly compiled one
    manually. This also makes it possible to build the package twice in a row.
---
 debian/rules | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/debian/rules b/debian/rules
index 64e5655..9cfa925 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,10 +2,24 @@
 
 PACKAGE = $(shell dh_listpackages)
 TMP     = $(CURDIR)/debian/$(PACKAGE)
+DYNFILE = $(CURDIR)/lib/Module/ExtractUse/Grammar.pm
 
 %:
 	dh $@
 
+override_dh_clean:
+	dh_clean
+	[ ! -f $(DYNFILE).save ] || mv -v $(DYNFILE).save $(DYNFILE)
+
+override_dh_auto_build:
+	[ ! -f $(DYNFILE) ] || mv -v $(DYNFILE) $(DYNFILE).save
+	dh_auto_build -- --verbose 1
+	# copy precompiled file manually.
+	# during build it gets created _after_ the lib/ -> lib/blib/ copying
+	$(RM) -v  $(CURDIR)/blib/lib/Module/ExtractUse/Grammar.pm
+	mkdir -pv $(CURDIR)/blib/lib/Module/ExtractUse/
+	cp -v     $(DYNFILE) $(CURDIR)/blib/lib/Module/ExtractUse/
+
 override_dh_auto_install:
 	dh_auto_install
 	$(RM) -v $(TMP)/usr/share/man/man3/Module::ExtractUse::Grammar.3pm

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-extractuse-perl.git



More information about the Pkg-perl-cvs-commits mailing list