diff options
Diffstat (limited to 'redhat/applications/konversation')
-rw-r--r-- | redhat/applications/konversation/konversation.spec | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/redhat/applications/konversation/konversation.spec b/redhat/applications/konversation/konversation.spec index 80e0b7e39..3b3a11a75 100644 --- a/redhat/applications/konversation/konversation.spec +++ b/redhat/applications/konversation/konversation.spec @@ -74,6 +74,23 @@ BuildRequires: libidn-devel # OPENSSL support BuildRequires: openssl-devel +# PYTHON support +%if 0%{?sle_version} >= 150400 || 0%{?rhel} >= 9 +%define with_python 0 +%global __python %__python3 +%else +%define with_python 1 +%if 0%{?rhel} == 8 || 0%{?fedora} >= 31 || 0%{?suse_version} >= 1500 || 0%{?mgaversion} >= 8 +%global python python2 +%global __python %__python2 +%global python_sitearch %{python2_sitearch} +%else +%global python python +%endif +%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +BuildRequires: %{python} +BuildRequires: %{python}-devel +%endif # SUSE desktop files utility %if 0%{?suse_version} @@ -110,7 +127,7 @@ BuildRequires: libXi6-devel # RHEL 6: available in EPEL # RHEL 7: available in NUX # RHEL 8: available in EPEL -%if 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?rhel} >= 5 || 0%{?suse_version} +%if 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} || ( 0%{?rhel} >= 5 && 0%{?rhel} <= 8 ) || 0%{?suse_version} %define with_xscreensaver 1 %if 0%{?fedora} || 0%{?rhel} >= 5 @@ -182,7 +199,7 @@ and experienced users alike will appreciate its many features: %if 0%{?fedora} >= 30 || 0%{?rhel} >= 8 || 0%{?mgaversion} >= 8 %__sed -i "konversation/scripts/media" \ "konversation/scripts/weather" \ - -e "s|/usr/bin/env python|/usr/bin/env python2|" + -e "s|/usr/bin/env python|/usr/bin/env %{python}|" %endif |