summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-06-17 11:14:25 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-06-18 13:18:26 +0200
commit784c9ebb7fb5011d7037c2355a275c580a16dcc8 (patch)
treedd37a1cb212ada6bb47916cd9162ce22ac8cedc9 /Makefile
parent34fb88a477b6e5cb97845a304d062770a2596f43 (diff)
Normalize dist tarballs.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 67af6f84..2f9517ad 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,12 @@ GPG ?= gpg
CODESPELL ?= codespell
CODESPELL_FLAGS ?= --disable-colors --write-changes
+SOURCE_DATE_EPOCH = $(shell git show -s --no-show-signature --format=%cI)
+TAR_FLAGS = --sort=name \
+ --mtime="$(SOURCE_DATE_EPOCH)" \
+ --owner=0 --group=0 --numeric-owner \
+ --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
+
ifeq ($(shell uname -s), Darwin)
INSTALL ?= ginstall
else
@@ -124,7 +130,7 @@ $(CARGO_TARGET_DIR)/dist/sequoia-$(VERSION):
$(CARGO_TARGET_DIR)/dist/sequoia-$(VERSION).tar: \
$(CARGO_TARGET_DIR)/dist/sequoia-$(VERSION)
- $(TAR) cf $@ -C $(CARGO_TARGET_DIR)/dist sequoia-$(VERSION)
+ $(TAR) $(TAR_FLAGS) -cf $@ -C $(CARGO_TARGET_DIR)/dist sequoia-$(VERSION)
%.xz: %
$(XZ) -c $< >$@