Description: Make builds byte for byte reproducible
 .
 Use the date from the changelog as the build date.
Author: Jean-Michel Vourgère <nirgal@debian.org>
Forwarded: no
Last-Update: 2015-07-27

Index: rrdtool/src/rrd_cgi.c
===================================================================
--- rrdtool.orig/src/rrd_cgi.c
+++ rrdtool/src/rrd_cgi.c
@@ -694,7 +694,7 @@ char     *rrdgetinternal(
         if (strcasecmp(args[0], "VERSION") == 0) {
             return stralloc(PACKAGE_VERSION);
         } else if (strcasecmp(args[0], "COMPILETIME") == 0) {
-            return stralloc(__DATE__ " " __TIME__);
+            return stralloc(BUILD_DATE " " BUILD_TIME);
         } else {
             return stralloc("[ERROR: internal unknown argument]");
         }
Index: rrdtool/src/rrd_tool.c
===================================================================
--- rrdtool.orig/src/rrd_tool.c
+++ rrdtool/src/rrd_tool.c
@@ -304,7 +304,7 @@ void PrintUsage(
         else if (!strcmp(cmd, "pwd"))
             help_cmd = C_PWD;
     }
-    fprintf(stdout, _(help_main), PACKAGE_VERSION, __DATE__, __TIME__);
+    fprintf(stdout, _(help_main), PACKAGE_VERSION, BUILD_DATE, BUILD_TIME);
     fflush(stdout);
     switch (help_cmd) {
     case C_NONE:
