Package: weightwatcher / 1.12+dfsg-3

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
28
29
30
31
32
33
34
35
36
37
38
From: Ole Streicher <olebole@debian.org>
Date: Mon, 11 Dec 2017 10:26:01 +0100
Subject: Replace the build date with the last changed date of configure.ac

This shall help to make the build reproducible.
---
 configure.ac    | 7 ++++---
 src/Makefile.am | 2 --
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c23427..5b879c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,9 +35,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, "Chiara Marmo")
 AC_SUBST(DATE2, "$date2")
diff --git a/src/Makefile.am b/src/Makefile.am
index bac2bbc..ed7eb5b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,5 +33,3 @@ weightwatcher_SOURCES	= field.c main.c makeit.c prefs.c readimage.c \
 			  readimage.h types.h vector.h fitswcs.c fitswcs.h \
                           wcscelsys.h xml.h xml.c
 weightwatcher_LDADD	= $(top_builddir)/src/fits/libfits.a $(top_builddir)/src/wcs/libwcs_c.a
-DATE=`date +"%Y-%m-%d"`
-