]> git.deb.at Git - pkg/t-prot.git/commitdiff
debian/rules: Set timestamp of all files to the same time
authorAxel Beckert <abe@deuxchevaux.org>
Sun, 8 Feb 2015 00:18:12 +0000 (01:18 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Sun, 8 Feb 2015 00:18:12 +0000 (01:18 +0100)
This makes the build reproducible.

debian/changelog
debian/rules

index b5c11ea9033d1a5e6f4c7077a30df229f2a09f06..0f090ab67c668110748d48962d0af1077a96d3c5 100644 (file)
@@ -1,3 +1,10 @@
+t-prot (3.3-2) UNRELEASED; urgency=medium
+
+  * debian/rules: Set timestamp of all new files to the same time to make
+    builds reproducible.
+
+ -- Axel Beckert <abe@debian.org>  Sun, 08 Feb 2015 01:13:18 +0100
+
 t-prot (3.3-1) unstable; urgency=medium
 
   * New upstream release
index 0c667399bd6a980bb7a2dc486ea735e08610c648..3104ee7cbf347106377ae6d7f445ed75433c6d83 100755 (executable)
@@ -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
@@ -71,6 +72,8 @@ 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
+       find $(TMP) -depth -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build $(TMP) ..