yifengyou / rpms / spacewalk-usix

Forked from rpms/spacewalk-usix 3 years ago
Clone

Blame SOURCES/spacewalk-usix-2.8.1-4-el8-to-spacewalk-usix-2.8.1-5-el8.patch

4252c9
diff --git a/spacewalk-usix.spec b/spacewalk-usix.spec
4252c9
index 2bf8720..1b550d5 100644
4252c9
--- a/spacewalk-usix.spec
4252c9
+++ b/spacewalk-usix.spec
4252c9
@@ -18,7 +18,7 @@
4252c9
 
4252c9
 Name:	    spacewalk-usix
4252c9
 Version:	2.8.1
4252c9
-Release:	4%{?dist}
4252c9
+Release:	5%{?dist}
4252c9
 Summary:	Spacewalk server and client nano six library
4252c9
 
4252c9
 License:	GPLv2
4252c9
@@ -33,16 +33,6 @@ Obsoletes: spacewalk-backend-usix < 2.8
4252c9
 %description
4252c9
 Library for writing code that runs on Python 2 and 3
4252c9
 
4252c9
-%package -n python2-%{name}
4252c9
-Summary: Spacewalk client micro six library
4252c9
-Provides: python2-spacewalk-backend-usix = %{version}-%{release}
4252c9
-Obsoletes: python2-spacewalk-backend-usix < 2.8
4252c9
-BuildRequires: python-devel
4252c9
-
4252c9
-%description -n python2-%{name}
4252c9
-Library for writing code that runs on Python 2 and 3
4252c9
-
4252c9
-%if 0%{?build_py3}
4252c9
 %package -n python3-%{name}
4252c9
 Summary: Spacewalk client micro six library
4252c9
 Provides: python3-spacewalk-backend-usix = %{version}-%{release}
4252c9
@@ -52,8 +42,6 @@ BuildRequires: python3-devel
4252c9
 %description -n python3-%{name}
4252c9
 Library for writing code that runs on Python 2 and 3
4252c9
 
4252c9
-%endif
4252c9
-
4252c9
 %prep
4252c9
 %setup -q
4252c9
 
4252c9
@@ -62,35 +50,16 @@ Library for writing code that runs on Python 2 and 3
4252c9
 %define debug_package %{nil}
4252c9
 
4252c9
 %install
4252c9
-install -m 0755 -d $RPM_BUILD_ROOT%{pythonrhnroot}/common
4252c9
-install -m 0644 __init__.py $RPM_BUILD_ROOT%{pythonrhnroot}/__init__.py
4252c9
-install -m 0644 common/__init__.py $RPM_BUILD_ROOT%{pythonrhnroot}/common/__init__.py
4252c9
-install -m 0644 common/usix.py* $RPM_BUILD_ROOT%{pythonrhnroot}/common/usix.py
4252c9
-
4252c9
-%if 0%{?build_py3}
4252c9
-install -d $RPM_BUILD_ROOT%{python3rhnroot}/common
4252c9
-cp $RPM_BUILD_ROOT%{pythonrhnroot}/__init__.py $RPM_BUILD_ROOT%{python3rhnroot}
4252c9
-cp $RPM_BUILD_ROOT%{pythonrhnroot}/common/__init__.py $RPM_BUILD_ROOT%{python3rhnroot}/common
4252c9
-cp $RPM_BUILD_ROOT%{pythonrhnroot}/common/usix.py $RPM_BUILD_ROOT%{python3rhnroot}/common
4252c9
-%endif
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 python2-%{name}
4252c9
-%dir %{pythonrhnroot}
4252c9
-%dir %{pythonrhnroot}/common
4252c9
-%{pythonrhnroot}/__init__.py
4252c9
-%{pythonrhnroot}/common/__init__.py
4252c9
-%{pythonrhnroot}/common/usix.py*
4252c9
-%exclude %{pythonrhnroot}/__init__.pyc
4252c9
-%exclude %{pythonrhnroot}/__init__.pyo
4252c9
-%exclude %{pythonrhnroot}/common/__init__.pyc
4252c9
-%exclude %{pythonrhnroot}/common/__init__.pyo
4252c9
-
4252c9
-%if 0%{?build_py3}
4252c9
-
4252c9
 %files -n python3-%{name}
4252c9
 %dir %{python3rhnroot}
4252c9
 %dir %{python3rhnroot}/common
4252c9
@@ -100,9 +69,11 @@ cp $RPM_BUILD_ROOT%{pythonrhnroot}/common/usix.py $RPM_BUILD_ROOT%{python3rhnroo
4252c9
 %{python3rhnroot}/common/__pycache__/*
4252c9
 %exclude %{python3rhnroot}/__pycache__/*
4252c9
 %exclude %{python3rhnroot}/common/__pycache__/__init__.*
4252c9
-%endif
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)