aboutsummaryrefslogtreecommitdiff
path: root/nx-libs.spec
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-02-23 12:19:14 +0100
committerMihai Moldovan <ionic@ionic.de>2023-02-23 12:19:14 +0100
commitd35c5d011a951ee8d331dfbe940d87fa7c98945e (patch)
treeb5c35845f836e31a27cf6a933dbd42bc2c86a7a8 /nx-libs.spec
parent8129c1f6bea9eac2e7af067414ebcf47c9e2fe51 (diff)
downloadnx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.tar.gz
nx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.tar.bz2
nx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.zip
nx-libs.spec: fix nxdialog hashbang selection, especially on *SuSE.
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 84140f381..d4370c7eb 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -478,8 +478,20 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
rm %{buildroot}%{_libdir}/*.la
# Fix python scripts
-%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8 || 0%{?py_ver} == 3
-sed -i '1 s/python/python3/' %{buildroot}%{_bindir}/nxdialog
+%if 0%{?suse_version}
+%if 0%{?suse_version} >= 1500
+sed -i -e '1c\
+%{_bindir}/python3' '%{buildroot}%{_bindir}/nxdialog'
+%else
+sed -i -e '1c\
+%{_bindir}/python2' '%{buildroot}%{_bindir}/nxdialog'
+%endif
+%else
+%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8
+pathfix.py -pni "%{__python3} %{py3_shbang_opts}" '%{buildroot}%{_bindir}/nxdialog'
+%else
+pathfix.py -pni "%{__python2} %{py2_shbang_opts}" '%{buildroot}%{_bindir}/nxdialog'
+%endif
%endif
%if 0%{?fdupes:1}