]>
Commit | Line | Data |
---|---|---|
70623732 JK |
1 | %bcond_without python2 |
2 | %bcond_with python3 # it seems it is not there, although 'six' is used | |
3 | ||
4 | Summary: Eucalyptus/AWS-compatible command line tools | |
5 | Name: euca2ools | |
6 | Version: 3.2.0 | |
b67b6229 | 7 | Release: 2 |
70623732 JK |
8 | License: BSD |
9 | Group: Applications/Networking | |
10 | Source0: http://downloads.eucalyptus.com/software/euca2ools/3.2/source/%{name}-%{version}.tar.xz | |
11 | # Source0-md5: b62502aa45f679c4f0ad01b658f095f5 | |
12 | URL: https://github.com/eucalyptus/euca2ools | |
13 | BuildRequires: rpm-pythonprov | |
14 | BuildRequires: rpmbuild(macros) >= 1.219 | |
15 | %if %{with python2} | |
16 | BuildRequires: python-setuptools > 7.0 | |
17 | %endif | |
18 | %if %{with python3} | |
19 | BuildRequires: python3-setuptools > 7.0 | |
20 | %endif | |
21 | Requires: gdisk | |
22 | Requires: gzip | |
23 | Requires: kpartx | |
24 | Requires: openssl-tools | |
25 | Requires: parted | |
26 | Requires: python-%{name} | |
27 | Requires: python-modules | |
28 | Requires: rsync | |
29 | Requires: util-linux | |
30 | BuildArch: noarch | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | Euca2ools are command line tools used to interact with Amazon Web | |
35 | Services (AWS) as well as other compatible services, such as | |
36 | Eucalyptus. They aim to use the same input as similar tools provided | |
37 | by AWS for each service individually along with several enhancements | |
38 | that make them easier to use. | |
39 | ||
40 | %package -n python-%{name} | |
41 | Summary: Euca2ools python modules | |
42 | Group: Libraries/Python | |
43 | Requires: python-lxml | |
44 | Requires: python-progressbar | |
45 | Requires: python-requestbuilder | |
46 | Requires: python-requests | |
47 | Requires: python-setuptools | |
48 | Requires: python-six | |
49 | ||
50 | %description -n python-%{name} | |
51 | ||
52 | ||
53 | %package -n python3-%{name} | |
54 | Summary: Euca2ools python modules | |
55 | Group: Libraries/Python | |
56 | Requires: python3-lxml | |
57 | Requires: python3-progressbar | |
58 | Requires: python3-requestbuilder | |
59 | Requires: python3-requests | |
60 | Requires: python3-setuptools | |
61 | Requires: python3-six | |
62 | ||
63 | %description -n python3-%{name} | |
64 | ||
65 | %prep | |
66 | %setup -q | |
67 | ||
68 | %build | |
69 | %if %{with python2} | |
47255696 | 70 | %py_build %{?with_tests:test} |
70623732 JK |
71 | %endif |
72 | ||
73 | %if %{with python3} | |
47255696 | 74 | %py3_build %{?with_tests:test} |
70623732 JK |
75 | %endif |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %if %{with python2} | |
47255696 | 81 | %py_install |
70623732 JK |
82 | |
83 | %py_postclean | |
84 | %endif | |
85 | ||
86 | %if %{with python3} | |
47255696 | 87 | %py3_install |
70623732 JK |
88 | %endif |
89 | ||
90 | %clean | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc README INSTALL | |
96 | %attr(755,root,root) %{_bindir}/* | |
97 | %{_mandir}/man1/eu*.1* | |
98 | ||
99 | %if %{with python2} | |
100 | %files -n python-%{name} | |
101 | %defattr(644,root,root,755) | |
102 | %{py_sitescriptdir}/%{name} | |
103 | %{py_sitescriptdir}/%{name}-%{version}-py*.egg-info | |
104 | %endif | |
105 | ||
106 | %if %{with python3} | |
107 | %files -n python3-%{name} | |
108 | %defattr(644,root,root,755) | |
109 | %{py3_sitescriptdir}/%{name} | |
110 | %{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info | |
111 | %endif |