You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. %global srcname kubespray
  2. %{!?upstream_version: %global upstream_version %{version}%{?milestone}}
  3. Name: kubespray
  4. Version: master
  5. Release: %(git describe | sed -r 's/v(\S+-?)-(\S+)-(\S+)/\1.dev\2+\3/')
  6. Summary: Ansible modules for installing Kubernetes
  7. Group: System Environment/Libraries
  8. License: ASL 2.0
  9. Url: https://github.com/kubernetes-incubator/kubespray
  10. Source0: https://github.com/kubernetes-incubator/kubespray/archive/%{upstream_version}.tar.gz#/%{name}-%{release}.tar.gz
  11. BuildArch: noarch
  12. BuildRequires: git
  13. BuildRequires: python2
  14. BuildRequires: python2-devel
  15. BuildRequires: python2-setuptools
  16. BuildRequires: python-d2to1
  17. BuildRequires: python2-pbr
  18. Requires: ansible
  19. Requires: python-jinja2 >= 2.10
  20. Requires: python-netaddr
  21. %description
  22. Ansible-kubespray is a set of Ansible modules and playbooks for
  23. installing a Kubernetes cluster. If you have questions, join us
  24. on the https://slack.k8s.io, channel '#kubespray'.
  25. %prep
  26. %autosetup -n %{name}-%{upstream_version} -S git
  27. %build
  28. export PBR_VERSION=%{release}
  29. %{__python2} setup.py build bdist_rpm
  30. %install
  31. export PBR_VERSION=%{release}
  32. export SKIP_PIP_INSTALL=1
  33. %{__python2} setup.py install --skip-build --root %{buildroot} bdist_rpm
  34. %files
  35. %doc %{_docdir}/%{name}/README.md
  36. %doc %{_docdir}/%{name}/inventory/sample/hosts.ini
  37. %config %{_sysconfdir}/%{name}/ansible.cfg
  38. %config %{_sysconfdir}/%{name}/inventory/sample/group_vars/all.yml
  39. %config %{_sysconfdir}/%{name}/inventory/sample/group_vars/k8s-cluster.yml
  40. %license %{_docdir}/%{name}/LICENSE
  41. %{python2_sitelib}/%{srcname}-%{release}-py%{python2_version}.egg-info
  42. %{_datarootdir}/%{name}/roles/
  43. %{_datarootdir}/%{name}/playbooks/
  44. %defattr(-,root,root)
  45. %changelog