Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2016-08-12

--- gnunet-gtk-0.10.1.orig/configure.ac
+++ gnunet-gtk-0.10.1/configure.ac
@@ -538,7 +538,11 @@ AC_SUBST(GNUNET_PEERINFO_GTK_YEARFROM, [
 AC_SUBST(GNUNET_STATISTICS_GTK_YEARFROM, [2010], [year of the first release])
 AC_SUBST(GNUNET_SETUP_GTK_YEARFROM, [2010], [year of the first release])
 
-thisyear=$(date | sed -e 's/.* \([[[:digit:]]]\+\)$/\1/')
+if test -n "$SOURCE_DATE_EPOCH"; then
+	thisyear=$(date --utc --date="@SOURCE_DATE_EPOCH" +%Y)
+else
+	thisyear=$(date +%Y)
+fi
 AC_SUBST(GNUNET_FS_GTK_YEARTO, ${thisyear}, [year of the most current release])
 AC_SUBST(GNUNET_PEERINFO_GTK_YEARTO, ${thisyear}, [year of the most current release])
 AC_SUBST(GNUNET_STATISTICS_GTK_YEARTO, ${thisyear}, [year of the most current release])
