From c3164342455a7c7085a1a59b5910e936241730c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 3 Nov 2015 11:58:19 +0100 Subject: To make build reproducible touch temporary c files with date of d/changelog --- debian/rules | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 7db8dc6..6b9f82f 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all export VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w)) +CHDATE:=$(shell dpkg-parsechangelog --show-field=Date) +B_DATE:=$(shell date -d "$(CHDATE)") + %: dh $@ @@ -12,11 +15,14 @@ override_dh_auto_configure: override_dh_install: dh_install + # touch temporary c files with date of d/changelog + # find -type f -name '*.c' -exec touch -r $(CURDIR)/debian/changelog {} \; # install temporary c files for debuging mkdir -p debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source find -type f -name '*.c' -exec cp --parent '{}' debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source/ ';' cd debian/shotwell-dbg/usr/share/doc/shotwell-dbg && \ - tar cJf temp-source.tar.xz temp-source + find . -newermt '$(B_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(B_DATE)' && \ + tar --mtime="$(B_DATE)" -cJf temp-source.tar.xz temp-source rm -fr debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source override_dh_installchangelogs: -- cgit v1.2.3