]>
Commit | Line | Data |
---|---|---|
9611de34 ER |
1 | %define module awscli |
2 | %define egg_name awscli | |
3 | %define pypi_name awscli | |
4 | Summary: Universal Command Line Environment for AWS | |
5 | Name: awscli | |
afff642d | 6 | Version: 1.20.40 |
9611de34 ER |
7 | Release: 1 |
8 | License: ASL 2.0 and MIT | |
9 | Group: Applications/Networking | |
e4e53cee | 10 | Source0: https://files.pythonhosted.org/packages/source/a/awscli/%{name}-%{version}.tar.gz |
afff642d | 11 | # Source0-md5: e1d0f2843de864d50bf3e59d23062f35 |
e4e53cee | 12 | URL: https://aws.amazon.com/cli/ |
9611de34 ER |
13 | BuildRequires: rpm-pythonprov |
14 | BuildRequires: rpmbuild(macros) >= 1.719 | |
afff642d | 15 | BuildRequires: python3-modules >= 1:3.6 |
9611de34 | 16 | BuildRequires: python3-setuptools |
afff642d | 17 | Requires: python3-%{pypi_name} = %{version} |
9611de34 ER |
18 | BuildArch: noarch |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | This package provides a unified command line interface to Amazon Web | |
23 | Services. | |
24 | ||
9611de34 ER |
25 | %package -n python3-%{pypi_name} |
26 | Summary: Python 3 package for awscli | |
27 | Group: Libraries/Python | |
28 | Requires: python3-PyYAML >= 3.10 | |
e4e53cee | 29 | Requires: python3-botocore >= 1.10.42 |
9611de34 ER |
30 | Requires: python3-colorama >= 0.2.5 |
31 | Requires: python3-docutils >= 0.10 | |
afff642d | 32 | Requires: python3-modules >= 1:3.6 |
9611de34 | 33 | Requires: python3-rsa >= 3.1.2 |
afff642d JP |
34 | Requires: python3-s3transfer >= 0.5 |
35 | Obsoletes: python-awscli < 1.20.40 | |
9611de34 ER |
36 | |
37 | %description -n python3-%{pypi_name} | |
38 | Python 3 package for awscli. | |
39 | ||
40 | %prep | |
41 | %setup -q | |
42 | ||
43 | rm -r %{name}.egg-info | |
44 | ||
45 | %build | |
9611de34 | 46 | %py3_build |
9611de34 ER |
47 | |
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
9611de34 | 50 | %py3_install |
9611de34 ER |
51 | |
52 | # We don't need the Windows CMD script | |
53 | rm $RPM_BUILD_ROOT%{_bindir}/aws.cmd | |
54 | ||
55 | # Fix path and permissions for bash completition | |
56 | install -d $RPM_BUILD_ROOT%{bash_compdir} | |
57 | mv $RPM_BUILD_ROOT%{_bindir}/aws_bash_completer $RPM_BUILD_ROOT%{bash_compdir} | |
58 | # Fix path and permissions for zsh completition | |
59 | install -d $RPM_BUILD_ROOT%{zsh_compdir} | |
60 | mv $RPM_BUILD_ROOT%{_bindir}/aws_zsh_completer.sh $RPM_BUILD_ROOT%{zsh_compdir} | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc README.rst LICENSE.txt | |
68 | %attr(755,root,root) %{_bindir}/aws | |
69 | %attr(755,root,root) %{_bindir}/aws_completer | |
70 | %{bash_compdir}/aws_bash_completer | |
71 | %{zsh_compdir}/aws_zsh_completer.sh | |
72 | ||
9611de34 ER |
73 | %files -n python3-%{pypi_name} |
74 | %defattr(644,root,root,755) | |
75 | %{py3_sitescriptdir}/%{module} | |
76 | %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info |