aboutsummaryrefslogtreecommitdiff
path: root/nx-libs.spec
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-02-23 15:28:20 +0100
committerMihai Moldovan <ionic@ionic.de>2023-02-23 15:28:20 +0100
commit288394c18c6aa70faabb69fa3a021cfbd300b8df (patch)
tree88de41a8aadd00804893371ce159dc692d23edfd /nx-libs.spec
parentb536e9f91f6c9cc851610943cd8e87dbf1f5f80c (diff)
downloadnx-libs-288394c18c6aa70faabb69fa3a021cfbd300b8df.tar.gz
nx-libs-288394c18c6aa70faabb69fa3a021cfbd300b8df.tar.bz2
nx-libs-288394c18c6aa70faabb69fa3a021cfbd300b8df.zip
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.
Diffstat (limited to 'nx-libs.spec')
-rw-r--r--nx-libs.spec16
1 files changed, 14 insertions, 2 deletions
diff --git a/nx-libs.spec b/nx-libs.spec
index 086602ee9..30c64904e 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -134,7 +134,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
@@ -491,10 +491,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