[X2Go-Commits] [x2goclient] 18/19: debian/rules: add force variables to bypass autodetection via lsb-release.
git-admin at x2go.org
git-admin at x2go.org
Wed May 12 19:28:24 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 5dcf6005c3d2b88d3562600804cc5403bcb26226
Author: Mihai Moldovan <ionic at ionic.de>
Date: Tue May 11 22:33:02 2021 +0200
debian/rules: add force variables to bypass autodetection via lsb-release.
This will be used by our buildscripts.
---
debian/changelog | 2 ++
debian/rules | 45 ++++++++++++++++++++++++++++++++-------------
2 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ef0a269..9b818f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,6 +61,8 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
+ Add Qt 4/5 switching, based upon the base system definition. Mostly
adapted from x2gomatebindings.
+ Force re-generation of debian/control in clean rule.
+ + Add force variables to bypass autodetection via lsb-release. This will
+ be used by our buildscripts.
* debian/:
+ New file "watch". We won't need this per se (since we're upstream and
there cannot be a newer version of the Debian package without releasing
diff --git a/debian/rules b/debian/rules
index c0411a5..f98aa6e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,23 +13,42 @@ VENDOR_UBUNTU :=
QT_VERSION := 4
-VENDOR_DEBIAN := $(shell { dpkg-vendor --is 'Debian' && echo 'yes'; } || { dpkg-vendor --is 'Raspbian' && echo 'yes'; })
+# Setting these disables autodetection.
+FORCE_VENDOR :=
+FORCE_RELEASE_VER :=
-ifeq ($(VENDOR_DEBIAN),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')
- # Let's fake testing's and unstable's "release version"...
- ifeq ($(RELEASE_VER),testing)
- RELEASE_VER := 999
- endif
- ifeq ($(RELEASE_VER),unstable)
- RELEASE_VER := 9999
+ifneq ($(FORCE_VENDOR),)
+ ifneq ($(FORCE_RELEASE_VER),)
+ VENDOR_DEBIAN := $(shell if [ 'debian' = '$(FORCE_VENDOR)' ] || [ '$(FORCE_VENDOR)' = 'raspbian' ]; then echo 'yes'; fi)
+ VENDOR_UBUNTU := $(shell if [ 'ubuntu' = '$(FORCE_VENDOR)' ]; then echo 'yes'; fi)
+ RELEASE_VER := $(FORCE_RELEASE_VER)
+
+ ifeq ($(VENDOR_UBUNTU),yes)
+ RELEASE_VER_MAJOR := $(shell printf '%s\n' '$(RELEASE_VER)' | /usr/bin/cut -d '.' -f '1')
+ RELEASE_VER_MINOR := $(shell printf '%s\n' '$(RELEASE_VER)' | /usr/bin/cut -d '.' -f '2')
+ endif
+ else
+ $(error FORCE_VENDOR passed, but FORCE_RELEASEVER empty.)
endif
else
- VENDOR_UBUNTU := $(shell dpkg-vendor --is 'Ubuntu' && echo 'yes')
+ VENDOR_DEBIAN := $(shell { dpkg-vendor --is 'Debian' && echo 'yes'; } || { dpkg-vendor --is 'Raspbian' && echo 'yes'; })
- ifeq ($(VENDOR_UBUNTU),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')
+ ifeq ($(VENDOR_DEBIAN),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')
+ # Let's fake testing's and unstable's "release version"...
+ ifeq ($(RELEASE_VER),testing)
+ RELEASE_VER := 999
+ endif
+ ifeq ($(RELEASE_VER),unstable)
+ RELEASE_VER := 9999
+ endif
+ else
+ VENDOR_UBUNTU := $(shell dpkg-vendor --is 'Ubuntu' && echo 'yes')
+
+ ifeq ($(VENDOR_UBUNTU),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')
+ endif
endif
endif
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list