yifengyou / rpms / spacewalk-usix

Forked from rpms/spacewalk-usix 3 years ago
Clone

Blame SPECS/spacewalk-usix.spec

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