From 2fd81444b63affa41dc7c580f53a46ddb7315329 Mon Sep 17 00:00:00 2001
From: aviau <alexandre@alexandreviau.net>
Date: Wed, 27 Jul 2016 15:13:33 -0400
Subject: [PATCH] Packaging: ubuntu14.04 support

Change-Id: I041c4e7c691fde3d3df4dffb0618dc252b9abb8d
Tuleap: #879
---
 Makefile.packaging               |  2 ++
 client-gnome                     |  2 +-
 daemon                           |  2 +-
 packaging/rules/debian/rules     |  7 +------
 scripts/build-package-debian.sh  | 12 +++++++++---
 scripts/make-packaging-target.py |  1 +
 6 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/Makefile.packaging b/Makefile.packaging
index a501cae0..f72cc449 100644
--- a/Makefile.packaging
+++ b/Makefile.packaging
@@ -75,6 +75,8 @@ package-all: package-debian8 \
              package-debian8_i386 \
              package-debian9 \
              package-debian9_i386 \
+             package-ubuntu14.04 \
+             package-ubuntu14.04_i386 \
              package-ubuntu15.10 \
              package-ubuntu15.10_i386 \
              package-ubuntu16.04 \
diff --git a/client-gnome b/client-gnome
index 28ca3174..02b283d7 160000
--- a/client-gnome
+++ b/client-gnome
@@ -1 +1 @@
-Subproject commit 28ca3174b8671e7c1c187c2072ea4308d15cf52a
+Subproject commit 02b283d7ddac093d7a729d5602815587135a23e8
diff --git a/daemon b/daemon
index 20f40205..a386003f 160000
--- a/daemon
+++ b/daemon
@@ -1 +1 @@
-Subproject commit 20f402051d423648b12fdc6828608bcdd56c6c9e
+Subproject commit a386003fe234b17bb5f309635252a8baa3cb5e4e
diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules
index e2c81fbc..a2b8b315 100755
--- a/packaging/rules/debian/rules
+++ b/packaging/rules/debian/rules
@@ -28,18 +28,13 @@ override_dh_auto_configure:
 		echo "Repacked $$projectname"; \
 	done
 
-	# Prevent bootstrap script from verifying checksums
-	mkdir -p daemon/contrib/native
-	touch daemon/contrib/native/.sum-msgpack
-	touch daemon/contrib/native/.sum-opendht
-	touch daemon/contrib/native/.sum-pjproject
-
 	###########################
 	## Ring Daemon configure ##
 	###########################
 	mkdir -p daemon/contrib/native
 	cd daemon/contrib/native && \
         ../bootstrap \
+				--no-checksums \
 				--disable-ogg \
 				--disable-flac \
 				--disable-vorbis \
diff --git a/scripts/build-package-debian.sh b/scripts/build-package-debian.sh
index 75b976da..b592bf30 100755
--- a/scripts/build-package-debian.sh
+++ b/scripts/build-package-debian.sh
@@ -45,9 +45,15 @@ dch --create --package ring --newversion ${DEBIAN_VERSION} "Automatic nightly re
 dch --release --distribution "unstable" debian/changelog
 
 # create orig tarball
-mk-origtargz ${RELEASE_TARBALL_FILENAME}
-rm --verbose ${RELEASE_TARBALL_FILENAME}
-GET_ORIG_SOURCE_OVERRIDE_USCAN_TARBALL=$(realpath ../ring_*.orig.tar.gz) debian/rules get-orig-source
+# mk-origtargz isn't in ubuntu14.04
+if [ "${DISTRIBUTION}" = "ubuntu14.04" ] || [ "${DISTRIBUTION}" = "ubuntu14.04_i386" ]; then
+    mv ${RELEASE_TARBALL_FILENAME} ../ring_${DEBIAN_VERSION}.orig.tar.gz
+else
+    mk-origtargz ${RELEASE_TARBALL_FILENAME}
+    rm --verbose ${RELEASE_TARBALL_FILENAME}
+fi
+
+GET_ORIG_SOURCE_OVERRIDE_USCAN_TARBALL=$(readlink -f ../ring_*.orig.tar.gz) debian/rules get-orig-source
 
 # move the tarball to the work directory
 mkdir -p /opt/ring-packaging
diff --git a/scripts/make-packaging-target.py b/scripts/make-packaging-target.py
index 2d7c84ee..08b096b4 100755
--- a/scripts/make-packaging-target.py
+++ b/scripts/make-packaging-target.py
@@ -45,6 +45,7 @@ PACKAGE_%(distribution)s_DOCKER_RUN_COMMAND:= docker run \\
     -e DEBIAN_VERSION=$(DEBIAN_VERSION) \\
     -e DEBIAN_PACKAGING_OVERRIDE=%(debian_packaging_override)s \\
     -e CURRENT_UID=$(CURRENT_UID) \\
+    -e DISTRIBUTION=%(distribution)s \\
     -v $(CURDIR):/opt/ring-project-ro:ro \\
     -v $(CURDIR)/packages/%(distribution)s:/opt/output \\
     -t $(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)
-- 
GitLab