diff --git a/debian/patches/02-reproducible-build.diff b/debian/patches/02-reproducible-build.diff new file mode 100644 index 0000000..39af2bf --- /dev/null +++ b/debian/patches/02-reproducible-build.diff @@ -0,0 +1,22 @@ +Description: Make the build reproducible +Author: Chris Lamb +Last-Update: 2016-08-08 +X-Bug: https://bugs.debian.org/833819 + +Make the build reproducible: +https://wiki.debian.org/ReproducibleBuilds + +--- n2n-1.3.1~svn3789.orig/Makefile ++++ n2n-1.3.1~svn3789/Makefile +@@ -57,7 +57,11 @@ $(N2N_LIB): $(N2N_OBJS) + version.c: + @echo $(N2N_VERSION) | sed -e 's/.*/const char * version = "&";/' > version.c + @uname -p | sed -e 's/.*/const char * osName = "&";/' >> version.c ++ifdef SOURCE_DATE_EPOCH ++ @LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" +"%D %r" | sed -e 's/.*/const char * buildDate = "&";/' >> version.c ++else + @date +"%D %r" | sed -e 's/.*/const char * buildDate = "&";/' >> version.c ++endif + + clean: + rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) *.dSYM *~ version.c diff --git a/debian/patches/series b/debian/patches/series index 757c2a7..9c0306c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01-edge.8.diff upstream-svn4235.patch makefile.patch +02-reproducible-build.diff