X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Frules;h=4f411be445df673a3b3fd66fa460917ebb2b4314;hb=042ee1a83eab31ecbe80b5fae030a6cce343fc68;hp=1c075f50f7633a62eff0223f072156d6fe086dab;hpb=389333ed2c618ebd9ddf34e7c54991422a8d6fff;p=pkg%2Ft-prot.git diff --git a/debian/rules b/debian/rules index 1c075f5..4f411be 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,7 @@ PKG = t-prot TMP = $(CURDIR)/debian/$(PKG) +BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date) INSTALL = install INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 @@ -45,14 +46,11 @@ debian/stamp-install: build $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG) - #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \ - # \ - # $(TMP)/usr/share/doc/$(PKG)/contrib $(INSTALL_FILE) contrib/filter_innd.pl contrib/README.examples \ $(TMP)/usr/share/doc/$(PKG)/examples $(INSTALL_FILE) ChangeLog \ $(TMP)/usr/share/doc/$(PKG)/changelog - cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \ + cd $(TMP)/usr/share && gzip -n9 doc/$(PKG)/changelog \ man/man1/t-prot.1 @@ -64,7 +62,7 @@ binary-indep: install $(TMP)/usr/share/doc/$(PKG) $(INSTALL_FILE) debian/changelog \ $(TMP)/usr/share/doc/$(PKG)/changelog.Debian - cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \ + cd $(TMP)/usr/share/doc/$(PKG) && gzip -n9 \ changelog.Debian $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \ $(TMP)/DEBIAN @@ -74,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) ..