[SCM] gmerlin/master: Enabled reproducible builds

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Wed Mar 9 23:28:29 UTC 2016


The following commit has been merged in the master branch:
commit 8f1830ee0d325735a89912f19bbdea4e6957c19b
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Wed Mar 9 23:45:50 2016 +0100

    Enabled reproducible builds

diff --git a/debian/patches/reproducible.patch b/debian/patches/reproducible.patch
new file mode 100644
index 0000000..1de214e
--- /dev/null
+++ b/debian/patches/reproducible.patch
@@ -0,0 +1,16 @@
+--- gmerlin.orig/lib/cmdline.c
++++ gmerlin/lib/cmdline.c
+@@ -372,9 +372,13 @@
+       char ** args;
+       char * string_uc;
+       
++#ifdef BUILD_DATE
++      strncpy(date_str, BUILD_DATE, 511);
++#else
+       time(&t);
+       localtime_r(&t, &brokentime);
+       strftime(date_str, 511, "%B %Y", &brokentime);
++#endif
+ 
+       string_uc = bg_toupper(app_data->name);
+       
diff --git a/debian/patches/series b/debian/patches/series
index c2dc2c9..a9ff39d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
 desktop_files.patch
 fix_manpages.patch
+reproducible.patch
 replace_bg_sem_h.patch
 fix_zeroplugins.patch
 gmerlin_visualizer_slave.patch
diff --git a/debian/rules b/debian/rules
index 770aecc..586c1df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -51,6 +51,11 @@ ifneq ($(DEB_HOST_ARCH_OS),linux)
 DEB_CONFIGURE_EXTRA_FLAGS += --disable-v4l --disable-v4l2
 endif
 
+## set timestamp for reproducible builds
+BUILD_DATE:=$(shell date -u -d "$$(dpkg-parsechangelog -SDate)" +"%Y/%m/%d")
+CPPFLAGS+="-DBUILD_DATE='\"$(BUILD_DATE)\"'"
+
+
 LDFLAGS+=-Wl,--as-needed
 
 build/gmerlin::

-- 
gmerlin packaging



More information about the pkg-multimedia-commits mailing list