[med-svn] [pycorrfit] 02/03: Update d/rules, make build reproducible

Alex Mestiashvili malex-guest at moszumanska.debian.org
Mon Oct 2 13:45:33 UTC 2017


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

malex-guest pushed a commit to branch master
in repository pycorrfit.

commit b610c2be40804df3437cb3d536fe7a7de52c8f33
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Mon Oct 2 15:25:08 2017 +0200

    Update d/rules, make build reproducible
---
 debian/rules | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/debian/rules b/debian/rules
index 6f2204b..ea57d0d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,13 +3,18 @@
 export DEB_BUILD_MAINT_OPTIONS=hardening=+BINDNOW
 export PYBUILD_NAME=pycorrfit
 export PYBUILD_TEST_PYTEST=0
+# see https://wiki.debian.org/ReproducibleBuilds/TimestampsInPDFGeneratedByLaTeX
+DEB_DATE_RFC_2822 := $(shell dpkg-parsechangelog -S date)
+DEB_DATE_RFC_3339 := $(shell date -u "--rfc-3339=seconds" -d "$(DEB_DATE_RFC_2822)")
 
 include /usr/share/dpkg/pkg-info.mk
 
-TEXDOC=PyCorrFit_doc.tex
-BIBDOC=PyCorrFit_doc.aux
-DOCDIR=doc
-PDF=PyCorrFit_doc.pdf
+TEXDOC = PyCorrFit_doc.tex
+BIBDOC = PyCorrFit_doc.aux
+DOCDIR = doc
+PDF = PyCorrFit_doc.pdf
+PDFLATEX = pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
+FAKETIME = faketime -f "$(DEB_DATE_RFC_3339)"
 
 %:
 	dh $@ --with python2 --buildsystem=pybuild
@@ -19,10 +24,12 @@ override_dh_auto_clean:
 	dh_auto_clean
 
 override_dh_auto_build:
-	cd $(DOCDIR) && pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
-	cd $(DOCDIR) && bibtex $(BIBDOC)
-	cd $(DOCDIR) && pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
-	cd $(DOCDIR) && pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
+	cd $(DOCDIR) && \
+	(   $(FAKETIME) $(PDFLATEX) \
+		bibtex $(BIBDOC) \
+		$(FAKETIME) $(PDFLATEX) \
+		$(FAKETIME) $(PDFLATEX) \
+	)
 	rm -f $(PDF); ln -s $(DOCDIR)/$(PDF)
 	convert -background "rgba(255,255,255,0)" -geometry 32x32 \
 		$(DOCDIR)/Images/PyCorrFit_icon.svg debian/pycorrfit.xpm

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pycorrfit.git



More information about the debian-med-commit mailing list