[X2Go-Commits] [nx-libs] 426/429: debian/rules: Define -DUseTIRPC=1 for nx-X11 build on Debian and Ubuntu versions that already have libtirpc.

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:37:20 CEST 2021


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

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit b67b910a6adf3287fad10cc97cf9484b0057b0bd
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Sep 11 20:45:16 2021 +0000

    debian/rules: Define -DUseTIRPC=1 for nx-X11 build on Debian and Ubuntu versions that already have libtirpc.
---
 debian/rules | 42 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 9bfee93fd..3ca425f76 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,44 @@ export LIBDIR = "/usr/lib/$(DEB_HOST_MULTIARCH)"
 export LIBEXECDIR = "$(LIBDIR)/nx/bin"
 export INCLUDEDIR = "/usr/include/$(DEB_HOST_MULTIARCH)"
 
+VENDOR_DEBIAN := 0
+RELEASE_VER := 0
+
+# detect VENDOR_* variables and RELEASE_VER{,_MAJOR,_MINOR}
+VENDOR_DEBIAN := $(shell { dpkg-vendor --is 'Debian' && echo 'yes'; } || { dpkg-vendor --is 'Raspbian' && echo 'yes'; })
+
+ifeq ($(VENDOR_DEBIAN),yes)
+  RELEASE_VER := $(shell /usr/bin/lsb_release -r |  cut -d ':' -f'2' |  sed -e 's/\s*//g' | 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 lsb_release -r | cut -d ':' -f '2' | sed -e 's/\s*//g' | cut -d '.' -f '1')
+    RELEASE_VER_MINOR := $(shell lsb_release -r | cut -d ':' -f '2' | sed -e 's/\s*//g' | cut -d '.' -f '2')
+  endif
+endif
+
+# detect when to use libtirpc and when glibc still provides rpc/rpc.h
+IMAKE_EXTRA_DEFINES := ""
+ifeq ($(VENDOR_DEBIAN),yes)
+  ifeq ($(shell /bin/bash -c '(( $(RELEASE_VER) >= 10 )) && echo '"'"'yes'"'"),yes)
+    IMAKE_EXTRA_DEFINES+="-DUseTIRPC=1"
+  endif
+else
+  ifeq ($(VENDOR_UBUNTU),yes)
+    ifeq ($(shell /bin/bash -c '(( $(RELEASE_VER_MAJOR) >= 18 )) && echo '"'"'yes'"'"),yes)
+      IMAKE_EXTRA_DEFINES+="-DUseTIRPC=1"
+    endif
+  endif
+endif
+
 %:
 	CONFIGURE="./configure --disable-silent-rules \
 	                       --prefix=/usr \
@@ -59,8 +97,8 @@ override_dh_auto_install:
 
 override_dh_auto_build:
 	debian/compat.sh
-	PREFIX='/usr' dh_auto_build --no-parallel -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))' || \
-	PREFIX='/usr' dh_auto_build -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))'
+	PREFIX='/usr' dh_auto_build --no-parallel -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))' IMAKE_DEFINES="$(IMAKE_EXTRA_DEFINES)" || \
+	PREFIX='/usr' dh_auto_build -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))' IMAKE_DEFINES="$(IMAKE_EXTRA_DEFINES)"
 
 override_dh_strip:
 	dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list