yifengyou / rpms / spacewalk-usix

Forked from rpms/spacewalk-usix 3 years ago
Clone

Blame SPECS/spacewalk-usix.spec

4252c9
%if 0%{?rhel} && 0%{?rhel} < 6
4252c9
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4252c9
%endif
4252c9
4252c9
%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8
4252c9
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
4252c9
%global python3rhnroot %{python3_sitelib}/spacewalk
4252c9
%endif
4252c9
4252c9
%if 0%{?fedora} || 0%{?rhel} >= 8
4252c9
%global build_py3   1
4252c9
%global default_py3 1
4252c9
%endif
4252c9
4252c9
%define pythonX %{?default_py3: python3}%{!?default_py3: python2}
4252c9
4252c9
%global pythonrhnroot %{python_sitelib}/spacewalk
4252c9
4252c9
Name:	    spacewalk-usix
4252c9
Version:	2.8.1
4252c9
Release:	5%{?dist}
4252c9
Summary:	Spacewalk server and client nano six library
4252c9
4252c9
License:	GPLv2
4252c9
URL:		  https://github.com/spacewalkproject/spacewalk
4252c9
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
4252c9
Patch0: spacewalk-usix-2.8.1-1-to-spacewalk-usix-2.8.1-2-el8.patch
4252c9
Patch1: spacewalk-usix-2.8.1-2-el8-to-spacewalk-usix-2.8.1-3-el8.patch
4252c9
Patch2: spacewalk-usix-2.8.1-3-el8-to-spacewalk-usix-2.8.1-4-el8.patch
4252c9
Patch3: spacewalk-usix-2.8.1-4-el8-to-spacewalk-usix-2.8.1-5-el8.patch
4252c9
BuildArch: noarch
4252c9
4252c9
Provides:	spacewalk-backend-usix = %{version}-%{release}
4252c9
Requires: %{pythonX}-%{name} = %{version}-%{release}
4252c9
Obsoletes: spacewalk-backend-usix < 2.8
4252c9
4252c9
%description
4252c9
Library for writing code that runs on Python 2 and 3
4252c9
4252c9
%package -n python3-%{name}
4252c9
Summary: Spacewalk client micro six library
4252c9
Provides: python3-spacewalk-backend-usix = %{version}-%{release}
4252c9
Obsoletes: python3-spacewalk-backend-usix < 2.8
4252c9
BuildRequires: python3-devel
4252c9
4252c9
%description -n python3-%{name}
4252c9
Library for writing code that runs on Python 2 and 3
4252c9
4252c9
%prep
4252c9
%setup -q
4252c9
%patch0 -p1
4252c9
%patch1 -p1
4252c9
%patch2 -p1
4252c9
%patch3 -p1
4252c9
4252c9
4252c9
%build
4252c9
%define debug_package %{nil}
4252c9
4252c9
%install
4252c9
install -m 0755 -d $RPM_BUILD_ROOT%{python3rhnroot}/common
4252c9
install -m 0644 __init__.py $RPM_BUILD_ROOT%{python3rhnroot}/__init__.py
4252c9
install -m 0644 common/__init__.py $RPM_BUILD_ROOT%{python3rhnroot}/common/__init__.py
4252c9
install -m 0644 common/usix.py* $RPM_BUILD_ROOT%{python3rhnroot}/common/usix.py
4252c9
4252c9
4252c9
%clean
4252c9
4252c9
%files
4252c9
4252c9
%files -n python3-%{name}
4252c9
%dir %{python3rhnroot}
4252c9
%dir %{python3rhnroot}/common
4252c9
%{python3rhnroot}/__init__.py
4252c9
%{python3rhnroot}/common/__init__.py
4252c9
%{python3rhnroot}/common/usix.py*
4252c9
%{python3rhnroot}/common/__pycache__/*
4252c9
%exclude %{python3rhnroot}/__pycache__/*
4252c9
%exclude %{python3rhnroot}/common/__pycache__/__init__.*
4252c9
4252c9
%changelog
4252c9
* Mon Apr 16 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.1-5
4252c9
- build spacewalk-usix just on python3 (tkasparek@redhat.com)
4252c9
4252c9
* Thu Mar 01 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.1-4
4252c9
- empty %%files section is required for a package to build as a metapackage
4252c9
  (tkasparek@redhat.com)
4252c9
4252c9
* Wed Feb 28 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.1-3
4252c9
- split spacewalk-usix into python2 and python3 variants (tkasparek@redhat.com)
4252c9
- build python3-spacewalk-usix also on rhel8 (tkasparek@redhat.com)
4252c9
4252c9
* Wed Feb 28 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.1-2
4252c9
- rebuild for rhel8
4252c9
4252c9
* Fri Feb 09 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.1-1
4252c9
- remove install/clean section initial cleanup
4252c9
- removed Group from specfile
4252c9
- removed BuildRoot from specfiles
4252c9
4252c9
* Wed Aug 09 2017 Michael Mraka <michael.mraka@redhat.com> 2.7.8-1
4252c9
- 1477753 - precompile py3 bytecode
4252c9
4252c9
* Mon Jul 31 2017 Eric Herget <eherget@redhat.com> 2.7.7-1
4252c9
- update copyright year
4252c9
4252c9
* Mon Jul 17 2017 Jan Dobes 2.7.6-1
4252c9
- Updated links to github in spec files
4252c9
- Migrating Fedorahosted to GitHub
4252c9
4252c9
* Fri Feb 24 2017 Tomas Kasparek <tkasparek@redhat.com> 2.7.5-1
4252c9
- Revert "do checks to match latest __init__.py from spacewalk-backend-libs"
4252c9
- don't package pyc and pyo files
4252c9
4252c9
* Thu Feb 23 2017 Tomas Kasparek <tkasparek@redhat.com> 2.7.4-1
4252c9
- do checks to match latest __init__.py from spacewalk-backend-libs
4252c9
- don't rely on module initialization on backend-libs
4252c9
4252c9
* Fri Feb 17 2017 Tomas Kasparek <tkasparek@redhat.com> 2.7.3-1
4252c9
- require python3 version of backend-libs on fedoras
4252c9
4252c9
* Fri Feb 17 2017 Tomas Kasparek <tkasparek@redhat.com> 2.7.2-1
4252c9
- require spacewalk-backend-libs for usix functionality
4252c9
4252c9
* Wed Feb 15 2017 Tomas Kasparek <tkasparek@redhat.com> 2.7.1-1
4252c9
- new package built with tito
4252c9
4252c9