Allow for reproducible builds, add source-date-epoch variable master
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Tue, 18 Jul 2017 17:31:39 +0000 (10:31 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Tue, 18 Jul 2017 17:31:39 +0000 (10:31 -0700)
Note: variant works with GNU date

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
Makefile.am

index 483ba90..aa28bb0 100755 (executable)
@@ -48,7 +48,7 @@ AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
 endif
 
 AM_CFLAGS += -DMPXYD_CONF="\"$(sysconfdir)/mpxyd.conf\""
-AM_CFLAGS += -DPACKAGE_DATE=$$(date +'%Y%m%d')
+AM_CFLAGS += -DPACKAGE_DATE=$$(date -u -d@$${SOURCE_DATE_EPOCH:-$$(date ++%s)} +'%Y%m%d')
 
 sysconf_DATA = doc/dat.conf