diff options
author | Mihai Moldovan <ionic@ionic.de> | 2023-02-23 12:19:14 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2023-02-23 12:19:14 +0100 |
commit | d35c5d011a951ee8d331dfbe940d87fa7c98945e (patch) | |
tree | b5c35845f836e31a27cf6a933dbd42bc2c86a7a8 | |
parent | 8129c1f6bea9eac2e7af067414ebcf47c9e2fe51 (diff) | |
download | nx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.tar.gz nx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.tar.bz2 nx-libs-d35c5d011a951ee8d331dfbe940d87fa7c98945e.zip |
nx-libs.spec: fix nxdialog hashbang selection, especially on *SuSE.
-rw-r--r-- | nx-libs.spec | 16 |
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} |