summaryrefslogtreecommitdiff
path: root/debian/patches/use-source-date-epoch-in-Makefile.patch
blob: 1eb49026261d9d4180ba10d7f6863bce2d330256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Subject: Patch Makefile to set date for BUILD_TIME using SOURCE_DATE_EPOCH.
Last-Update: Mon, 14 Dec 2020 19:56:00 -0800
Bug-Debian: https://bugs.debian.org/977435

https://reproducible-builds.org/docs/source-date-epoch/

--- a/Makefile
+++ b/Makefile
@@ -266,7 +266,7 @@ both-debug: bowtie2-align-s-debug bowtie
 DEFS := -fno-strict-aliasing \
   -DBOWTIE2_VERSION="\"`cat BOWTIE2_VERSION`\"" \
   -DBUILD_HOST="\"$${HOSTNAME:-`hostname`}\"" \
-  -DBUILD_TIME="\"`date -u`\"" \
+  -DBUILD_TIME="\"`LC_ALL=C date -u -d@$(SOURCE_DATE_EPOCH)`\"" \
   -DCOMPILER_VERSION="\"`$(CXX) -v 2>&1 | tail -1`\"" \
   $(FILE_FLAGS) \
   $(PREF_DEF) \