76 lines
2.6 KiB
RPMSpec
76 lines
2.6 KiB
RPMSpec
|
|
%global debug_package %{nil}
|
||
|
|
%global build_py3 1
|
||
|
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||
|
|
%{!?python3_sitelib: %define python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||
|
|
|
||
|
|
Name: rhnlib
|
||
|
|
Version: 2.8.11
|
||
|
|
Release: 3
|
||
|
|
Summary: Python libraries for the Spacewalk project
|
||
|
|
URL: https://github.com/spacewalkproject/spacewalk
|
||
|
|
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
|
||
|
|
License: GPLv2
|
||
|
|
|
||
|
|
%description
|
||
|
|
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||
|
|
|
||
|
|
%package -n python2-rhnlib
|
||
|
|
Summary: Python libraries for the Spacewalk project
|
||
|
|
BuildRequires: python2-devel
|
||
|
|
Requires: python2-pyOpenSSL
|
||
|
|
Provides: python2-rhnlib = %{version}-%{release}
|
||
|
|
Provides: rhnlib = %{version}-%{release}
|
||
|
|
Obsoletes: rhnlib < %{version}-%{release}
|
||
|
|
%{?python_provide:%python_provide python2-rhnlib}
|
||
|
|
|
||
|
|
Conflicts: rhncfg < 5.10.45 spacewalk-proxy-installer < 1.3.2 rhn-client-tools < 1.3.3
|
||
|
|
Conflicts: rhn-custom-info < 5.4.7 rhnpush < 5.5.10 rhnclient < 0.10 spacewalk-proxy < 1.3.6
|
||
|
|
|
||
|
|
%description -n python2-rhnlib
|
||
|
|
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||
|
|
|
||
|
|
%if 0%{?build_py3}
|
||
|
|
%package -n python3-rhnlib
|
||
|
|
Summary: Python libraries for the Spacewalk project
|
||
|
|
BuildRequires: python3-devel
|
||
|
|
Requires: python3-pyOpenSSL
|
||
|
|
%{?python_provide:%python_provide python3-rhnlib}
|
||
|
|
Conflicts: rhncfg < 5.10.45 spacewalk-proxy-installer < 1.3.2 rhn-client-tools < 1.3.3
|
||
|
|
Conflicts: rhn-custom-info < 5.4.7 rhnpush < 5.5.10 rhnclient < 0.10 spacewalk-proxy < 1.3.6
|
||
|
|
|
||
|
|
%description -n python3-rhnlib
|
||
|
|
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup %{name}-%{version}
|
||
|
|
if [ ! -e setup.py ]; then
|
||
|
|
sed -e 's/@VERSION@/%{version}/' -e 's/@NAME@/%{name}/' setup.py.in > setup.py
|
||
|
|
fi
|
||
|
|
if [ ! -e setup.cfg ]; then
|
||
|
|
sed 's/@RELEASE@/%{release}/' setup.cfg.in > setup.cfg
|
||
|
|
fi
|
||
|
|
|
||
|
|
%build
|
||
|
|
make -f Makefile.rhnlib
|
||
|
|
|
||
|
|
%install
|
||
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
|
||
|
|
%if 0%{?build_py3}
|
||
|
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files -n python2-rhnlib
|
||
|
|
%doc ChangeLog COPYING README TODO
|
||
|
|
%{python_sitelib}/*
|
||
|
|
|
||
|
|
%if 0%{?build_py3}
|
||
|
|
%files -n python3-rhnlib
|
||
|
|
%doc ChangeLog COPYING README TODO
|
||
|
|
%{python3_sitelib}/*
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Nov 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.11-3
|
||
|
|
- Package init
|