[X2Go-Commits] [x2gomatebindings] 02/04: debian/rules: use bash for arithmetic operations, not supported by sh.

git-admin at x2go.org git-admin at x2go.org
Sat Jun 11 13:37:40 CEST 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gomatebindings.

commit cac39313ce18a93dc26a47454672905c686baae8
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Jun 11 03:22:40 2016 +0200

    debian/rules: use bash for arithmetic operations, not supported by sh.
---
 debian/changelog |    1 +
 debian/rules     |   10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 928bcac..07bbf7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,7 @@ x2gomatebindings (0.0.1.4-0~x2go1) UNRELEASED; urgency=low
   * debian/rules:
     - Add per-distro and per-version substitution variable for GTK library
       version selection.
+    - Use bash for arithmetic operations, not supported by sh.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Tue, 10 Feb 2015 23:48:43 +0100
 
diff --git a/debian/rules b/debian/rules
index 2ce773f..433885e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,22 +4,24 @@ ifeq ($(shell dpkg-vendor --is Debian && echo yes),yes)
 	RELEASE_VER = $(shell /usr/bin/lsb_release -r | /bin/sed -e 's/[	 ]*//g' | /usr/bin/cut -d ':' -f '2' | /usr/bin/cut -d '.' -f '1')
 	SUBSTVARS = -Vdist:Depends="libgtk-2.0-bin"
 	USE_GTK = 2.0
-ifeq ($(shell (( $(RELEASE_VER) >= 9 )) && echo yes),yes)
+ifeq ($(shell /bin/bash -c '(( $(RELEASE_VER) >= 9 )) && echo yes'),yes)
 	SUBSTVARS = -Vdist:Depends="libgtk-3.0-bin"
 	USE_GTK = 3.0
 endif
-else ifeq($(shell dpkg-vendor --is Ubuntu && echo yes),yes)
+else
+ifeq($(shell dpkg-vendor --is Ubuntu && echo yes),yes)
 	RELEASE_VER_MAJOR = $(shell /usr/bin/lsb_release -r | /bin/sed -e 's/[	 ]*//g' | /usr/bin/cut -d ':' -f '2' | /usr/bin/cut -d '.' -f '1')
 	RELEASE_VER_MINOR = $(shell /usr/bin/lsb_release -r | /bin/sed -e 's/[	 ]*//g' | /usr/bin/cut -d ':' -f '2' | /usr/bin/cut -d '.' -f '2')
 	SUBSTVARS = -Vdist:Depends="libgtk-2.0-bin"
 	USE_GTK = 2.0
-ifeq ($(shell (( $(RELEASE_VER_MAJOR) >= 16 )) && echo yes),yes)
-ifeq ($(shell (( $(RELEASE_VER_MINOR) >= 10 )) && echo yes),yes)
+ifeq ($(shell /bin/bash -c '(( $(RELEASE_VER_MAJOR) >= 16 )) && echo yes'),yes)
+ifeq ($(shell /bin/bash -c '(( $(RELEASE_VER_MINOR) >= 10 )) && echo yes'),yes)
 	SUBSTVARS = -Vdist:Depends="libgtk-3.0-bin"
 	USE_GTK = 3.0
 endif
 endif
 endif
+endif
 
 %:
 	dh $@

--
Alioth's /srv/git/code.x2go.org/x2gomatebindings.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gomatebindings.git


More information about the x2go-commits mailing list