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.

62 lines
1.8 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 >= 2.5.0
  19. Requires: python-jinja2 >= 2.10
  20. Requires: python-netaddr
  21. Requires: python-pbr
  22. %description
  23. Ansible-kubespray is a set of Ansible modules and playbooks for
  24. installing a Kubernetes cluster. If you have questions, join us
  25. on the https://slack.k8s.io, channel '#kubespray'.
  26. %prep
  27. %autosetup -n %{name}-%{upstream_version} -S git
  28. %build
  29. export PBR_VERSION=%{release}
  30. %{__python2} setup.py build bdist_rpm
  31. %install
  32. export PBR_VERSION=%{release}
  33. export SKIP_PIP_INSTALL=1
  34. %{__python2} setup.py install --skip-build --root %{buildroot} bdist_rpm
  35. %files
  36. %doc %{_docdir}/%{name}/README.md
  37. %doc %{_docdir}/%{name}/inventory/sample/hosts.ini
  38. %config %{_sysconfdir}/%{name}/ansible.cfg
  39. %config %{_sysconfdir}/%{name}/inventory/sample/group_vars/all.yml
  40. %config %{_sysconfdir}/%{name}/inventory/sample/group_vars/k8s-cluster.yml
  41. %license %{_docdir}/%{name}/LICENSE
  42. %{python2_sitelib}/%{srcname}-%{release}-py%{python2_version}.egg-info
  43. %{_datarootdir}/%{name}/roles/
  44. %{_datarootdir}/%{name}/playbooks/
  45. %defattr(-,root,root)
  46. %changelog