Package: scamp / 2.0.4+dfsg-1

Replace-the-build-date-with-the-last-changed-date-of-conf.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Ole Streicher <olebole@debian.org>
Date: Mon, 25 Sep 2017 13:11:09 +0200
Subject: Replace the build date with the last changed date of configure.ac

This shall help to make the build reproducible.
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5617ac1..baabf44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,10 @@ AC_CONFIG_SRCDIR(src/makeit.c)
 AC_CONFIG_AUX_DIR(autoconf)
 AC_CONFIG_HEADERS(config.h)
 AM_INIT_AUTOMAKE
-date=`date +%Y-%m-%d`
-date2=`date +"%a %b %d %Y"`
-date3=`date +"%B %Y"`
+d0=`fgrep "Last modified" configure.ac | cut -d: -f2- | head -1 | sed "s+\(..\)/\(..\)/\(....\)+\\3-\\2-\\1+"`
+date=`date +%Y-%m-%d -d $d0`
+date2=`date +"%a %b %d %Y" -d $d0`
+date3=`date +"%B %Y" -d $d0`
 AC_DEFINE_UNQUOTED(DATE, "$date", [Archive creation date])
 AC_SUBST(PACKAGER, "Emmanuel Bertin")
 AC_SUBST(DATE2, "$date2")