This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-cli. commit d7319594cb6ec474cd6f73e576185fb1927a23d2 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Dec 18 20:41:01 2019 +0100 pyhoca-cli.spec: backport macros from python-x2go.spec. --- debian/changelog | 5 +++- pyhoca-cli.spec | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 885e6b5..dee844d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium - * Continue development + * [ Mihai Moldovan ] + * New upstream version (0.6.1.1): + * pyhoca-cli.spec: + + Backport macros from python-x2go.spec. -- X2Go Release Manager <git-admin@x2go.org> Fri, 22 Nov 2019 15:26:45 +0100 diff --git a/pyhoca-cli.spec b/pyhoca-cli.spec index a542640..5e825a3 100644 --- a/pyhoca-cli.spec +++ b/pyhoca-cli.spec @@ -1,3 +1,92 @@ +# Add conditional and ... +%if 0%{?suse_version} > 1310 || 0%{?fedora} >= 26 || 0%{?rhel} >= 8 +# ... enable by default on newer distros. +%bcond_without python3 +%else +# ... disable by default on older distros. +%bcond_with python3 +%endif + +# Fedora 30 deprecated Python 2, 31 disabled support for building these +# packages. +%if 0%{?fedora} >= 31 +%bcond_with python2 +%else +%bcond_without python2 +%endif + +# Provide a default implementation, essentially for non-*SuSE platforms. +%if 0%{?with_python3} +%if ( ! ( 0%{?rhel} ) ) +%global name_helper_python3 python3 +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python3-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python3-%{**}} +%endif +%else +%if 0%{?rhel} >= 7 +%global name_helper_python3 python%{python3_pkgversion} +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python%{python3_pkgversion}-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python%{python3_pkgversion}-%{**}} +%endif +%else +%global name_helper_python3 python34 +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**} python34-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python34-%{**}} +%endif +%endif +%endif +%else +%global name_helper_python3 %{nil} +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module()} +%endif +%endif + +%if ! 0%{?with_python3} +%global skip_python3 1 +%endif + +%if ! 0%{?with_python2} +%global skip_python2 1 +%endif + +# Workaround for OpenSuSE Leap 42.3. This is the first version to introduce +# the macros, but in a broken state. It will generate pythonX dependencies +# if pythonX has been installed in the build environment and not honor +# skip_pythonX. +# Override to the expected behavior. +%if 0%{?sle_version} && 0%{?sle_version} == 120300 && 0%{?is_opensuse} +%if 0%{?with_python3} +%if 0%{?with_python2} +%global python_module() python-%{**} python3-%{**} +%else +%global python_module() python3-%{**} +%endif +%else +%if 0%{?with_python2} +%global python_module() python-%{**} +%else +%global python_module() +%endif +%endif +%endif + Name: pyhoca-cli Version: 0.6.1.2 Release: 0.0x2go1%{?dist} -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git