yifengyou / rpms / spacewalk-usix

Forked from rpms/spacewalk-usix 3 years ago
Clone

Blame SPECS/spacewalk-usix.spec

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