THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

This is Gitea test Portainer repository mirror from Github
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.
 
 
 
 
 
 

95 lines
2.6 KiB

  1. Name: portainer
  2. Version: 1.24.0-dev
  3. Release: 0
  4. License: Zlib
  5. Summary: A lightweight docker management UI
  6. Url: https://portainer.io
  7. Group: BLAH
  8. Source0: https://github.com/portainer/portainer/releases/download/%{version}/portainer-%{version}-linux-amd64.tar.gz
  9. Source1: portainer.service
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  11. %if 0%{?suse_version}
  12. BuildRequires: help2man
  13. %endif
  14. Requires: docker
  15. %{?systemd_requires}
  16. BuildRequires: systemd
  17. ## HowTo build ##
  18. # You can use spectool to fetch sources
  19. # spectool -g -R distribution/portainer.spec
  20. # Then build with 'rpmbuild -ba distribution/portainer.spec'
  21. %description
  22. Portainer is a lightweight management UI which allows you to easily manage
  23. your different Docker environments (Docker hosts or Swarm clusters).
  24. Portainer is meant to be as simple to deploy as it is to use.
  25. It consists of a single container that can run on any Docker engine
  26. (can be deployed as Linux container or a Windows native container).
  27. Portainer allows you to manage your Docker containers, images, volumes,
  28. networks and more ! It is compatible with the standalone Docker engine and with Docker Swarm mode.
  29. %prep
  30. %setup -qn portainer
  31. %build
  32. %if 0%{?suse_version}
  33. help2man -N --no-discard-stderr ./portainer > portainer.1
  34. %endif
  35. %install
  36. # Create directory structure
  37. install -D -m 0755 portainer %{buildroot}%{_sbindir}/portainer
  38. install -d -m 0755 %{buildroot}%{_datadir}/portainer/public
  39. install -d -m 0755 %{buildroot}%{_localstatedir}/lib/portainer
  40. install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/portainer.service
  41. %if 0%{?suse_version}
  42. install -D -m 0644 portainer.1 %{buildroot}%{_mandir}/man1/portainer.1
  43. ( cd %{buildroot}%{_sbindir} ; ln -s service rcportainer )
  44. %endif
  45. # populate
  46. # don't install docker binary with package use system wide installed one
  47. cp -ra public/ %{buildroot}%{_datadir}/portainer/
  48. %pre
  49. %if 0%{?suse_version}
  50. %service_add_pre portainer.service
  51. #%%else # this does not work on rhel 7?
  52. #%%systemd_pre portainer.service
  53. true
  54. %endif
  55. %preun
  56. %if 0%{?suse_version}
  57. %service_del_preun portainer.service
  58. %else
  59. %systemd_preun portainer.service
  60. %endif
  61. %post
  62. %if 0%{?suse_version}
  63. %service_add_post portainer.service
  64. %else
  65. %systemd_post portainer.service
  66. %endif
  67. %postun
  68. %if 0%{?suse_version}
  69. %service_del_postun portainer.service
  70. %else
  71. %systemd_postun_with_restart portainer.service
  72. %endif
  73. %files
  74. %defattr(-,root,root)
  75. %{_sbindir}/portainer
  76. %{_datadir}/portainer/public
  77. %dir %{_localstatedir}/lib/portainer/
  78. %{_unitdir}/portainer.service
  79. %if 0%{?suse_version}
  80. %{_mandir}/man1/portainer.1*
  81. %{_sbindir}/rcportainer
  82. %endif