diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-03 11:58:19 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-03 11:58:19 +0100 |
commit | c3164342455a7c7085a1a59b5910e936241730c8 (patch) | |
tree | b504ed08084fa4c35de9b084c9016274ce2bb730 /debian/rules | |
parent | 4780fe49c9e136818ff70d9efbbe4a2196db5fbf (diff) |
To make build reproducible touch temporary c files with date of d/changelog
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 8 |
1 files changed, 7 insertions, 1 deletions
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: |