[X2Go-Commits] [nx-libs] 06/06: nx-libs.spec: only depend upon pathfix.py for Fedora 27+ and RHEL 7+.
git-admin at x2go.org
git-admin at x2go.org
Thu Jun 1 13:49:42 CEST 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch build-3.5.99.26
in repository nx-libs.
commit 6afb5871304fa96b6349a5aa502c8ae76fe79c68
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Feb 23 15:28:20 2023 +0100
nx-libs.spec: only depend upon pathfix.py for Fedora 27+ and RHEL 7+.
On older systems, use a less sophisticated way to replace the hashbang.
---
nx-libs.spec | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/nx-libs.spec b/nx-libs.spec
index 43a8a1f6a..89ccb551d 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -130,7 +130,7 @@ BuildRequires: zlib-devel
BuildRequires: libtirpc-devel
%endif
-%if 0%{?fedora} || 0%{?rhel}
+%if 0%{?fedora} > 26 || 0%{?rhel} > 6
BuildRequires: /usr/bin/pathfix.py
%endif
@@ -487,10 +487,22 @@ sed -i -e '1c\
%{_bindir}/python2' '%{buildroot}%{_bindir}/nxdialog'
%endif
%else
-%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8
+# Unfortunately, pathfix.py is not available everywhere, so where it is not,
+# we replace it in a less sophisticated way.
+%if 0%{?fedora} > 22 || 0%{?rhel} > 7
+%if 0%{?fedora} > 26 || 0%{?rhel} > 7
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" '%{buildroot}%{_bindir}/nxdialog'
%else
+sed -i -e '1c\
+%{__python3}' '%{buildroot}%{_bindir}/nxdialog'
+%endif
+%else
+%if 0%{?rhel} > 6
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" '%{buildroot}%{_bindir}/nxdialog'
+%else
+sed -i -e '1c\
+/usr/bin/python2' '%{buildroot}%{_bindir}/nxdialog'
+%endif
%endif
%endif
--
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