aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}