[med-svn] [pyscanfcs] 02/05: Update d/rules, make build reproducible

Alex Mestiashvili malex-guest at moszumanska.debian.org
Fri Oct 20 22:57:26 UTC 2017


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

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

commit fc69774680ac5a791759bca7791d686cf52244ec
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Sat Oct 21 00:35:28 2017 +0200

    Update d/rules, make build reproducible
---
 debian/rules | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/debian/rules b/debian/rules
index 4048e46..2985f84 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,13 +1,18 @@
 #!/usr/bin/make -f
 
-TEXDOC=PyScanFCS_doc.tex
-DOCDIR=doc
-BIBDOC=PyScanFCS_doc.aux
-PDF=PyScanFCS_doc.pdf
+TEXDOC = PyScanFCS_doc.tex
+DOCDIR = doc
+BIBDOC = PyScanFCS_doc.aux
+PDF = PyScanFCS_doc.pdf
+# 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)")
+PDFLATEX = pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
+FAKETIME = faketime -f "$(DEB_DATE_RFC_3339)"
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+pkg := pyscanfcs
 
 %:
 	dh $@ --with python2 --buildsystem=pybuild
@@ -17,10 +22,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/PyScanFCS_icon.svg debian/pyscanfcs.xpm
@@ -33,8 +40,8 @@ override_dh_install:
 	chmod -R 644 debian/$(pkg)/usr/share/doc/$(pkg)/examples/misc
 	rm -f debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/ChangeLog.txt
 	rm -f debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/$(PDF)
-	ln -s /usr/share/doc/pyscanfcs/ChangeLog.txt debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/ChangeLog.txt 
-	ln -s /usr/share/doc/pyscanfcs/$(PDF) debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/$(PDF) 
+	ln -s /usr/share/doc/pyscanfcs/ChangeLog.txt debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/ChangeLog.txt
+	ln -s /usr/share/doc/pyscanfcs/$(PDF) debian/$(pkg)/usr/lib/python2.7/dist-packages/pyscanfcs_doc/$(PDF)
 
 override_dh_fixperms:
 	dh_fixperms

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



More information about the debian-med-commit mailing list