-
Notifications
You must be signed in to change notification settings - Fork 2
/
sat5to6.spec
91 lines (71 loc) · 2.31 KB
/
sat5to6.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
%global _binary_filedigest_algorithm 1
%global _source_filedigest_algorithm 1
%global _binary_payload w9.gzdio
%global _source_payload w9.gzdio
%global _hardened_build 1
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: sat5to6
Version: 1.0.1
Release: 2%{?dist}
Summary: Migration tool for moving from Satellite 5 to Satellite 6
Group: System Environment/Base
License: GPLv2
URL: https://www.candlepinproject.org
BuildArch: noarch
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: python-rhsm >= 0:1.13.2
Requires: rhnlib
%if 0%{?rhel} == 5
Requires: subscription-manager >= 0:1.8.25
%endif
%if 0%{?rhel} == 6
Requires: subscription-manager >= 0:1.9.13
%endif
%if 0%{?rhel} == 7
Requires: subscription-manager >= 0:1.10.14-10
%endif
# Since the migration data package is not in Fedora, we can only require it
# on RHEL.
%if 0%{?rhel}
Requires: subscription-manager-migration-data
%endif
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: gettext
%description
%{summary}.
%prep
%setup -q
%build
%{__python} setup.py build
%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install --root %{buildroot}
# fix timestamps on our byte compiled files so they match across arches
find %{buildroot} -name \*.py -exec touch -r %{SOURCE0} '{}' \;
%find_lang %{name}
%{__install} -d %{buildroot}%{_var}/log/rhsm
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc LICENSE
%attr(755,root,root) %dir %{_var}/log/rhsm
%attr(755,root,root) %{_sbindir}/sat5to6
%{python2_sitelib}/%{name}/*
%{python2_sitelib}/%{name}-*.egg-info
%{_mandir}/man8/%{name}.8*
%changelog
* Fri Sep 19 2014 Alex Wood <[email protected]> 1.0.1-2
- Mark this package as noarch
* Fri Sep 19 2014 Alex Wood <[email protected]> 1.0.1-1
- Add man page
* Fri Sep 19 2014 Alex Wood <[email protected]> 1.0.0-2
- Update version requirements for subscription-manager
* Sun Sep 07 2014 Alex Wood <[email protected]> 1.13.1-1
- Initial packaging