File: Replace-the-build-date-with-the-last-changed-date-of-conf.patch

package info (click to toggle)
stiff 2.4.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,384 kB
  • sloc: sh: 8,729; ansic: 7,862; makefile: 39
file content (27 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (4)
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: Thu, 28 May 2015 16:53:18 +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 a8167e0..a77fd8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,9 +38,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")