X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Frules;h=ed79cf847f29bd62dacabf159234278bd26d7282;hb=92890547320a687838b916e415cd189564aa044f;hp=0c667399bd6a980bb7a2dc486ea735e08610c648;hpb=3af8c69c8abf3e580ea9e17ad1dc5dd275b674c5;p=pkg%2Ft-prot.git diff --git a/debian/rules b/debian/rules index 0c66739..ed79cf8 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,11 @@ #!/usr/bin/make -f # debian/rules for t-prot package -# Copyright 2002-2012 by Gerfried Fuchs +# Copyright 2002-2012 by Rhonda D'Vine # Licenced under WTFPLv2 PKG = t-prot TMP = $(CURDIR)/debian/$(PKG) +BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date) INSTALL = install INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 @@ -71,6 +72,12 @@ binary-indep: install dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP) cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ xargs -r0 md5sum > DEBIAN/md5sums + # Make build reproducible: + # Hardcode permissions for files created by output redirection + chmod 644 $(TMP)/DEBIAN/md5sums $(TMP)/DEBIAN/templates + # Set timestamp of all files to timestamp in debian/changelog entry + find $(TMP) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build $(TMP) ..