2017-10-18 16:08:09 +00:00
|
|
|
Name: portainer
|
2020-04-21 00:10:26 +00:00
|
|
|
Version: 2.0.0-dev
|
2017-10-18 16:08:09 +00:00
|
|
|
Release: 0
|
|
|
|
License: Zlib
|
|
|
|
Summary: A lightweight docker management UI
|
|
|
|
Url: https://portainer.io
|
|
|
|
Group: BLAH
|
|
|
|
Source0: https://github.com/portainer/portainer/releases/download/%{version}/portainer-%{version}-linux-amd64.tar.gz
|
|
|
|
Source1: portainer.service
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: help2man
|
|
|
|
%endif
|
|
|
|
Requires: docker
|
|
|
|
%{?systemd_requires}
|
|
|
|
BuildRequires: systemd
|
|
|
|
|
2018-04-03 23:06:02 +00:00
|
|
|
## HowTo build ##
|
|
|
|
# You can use spectool to fetch sources
|
|
|
|
# spectool -g -R distribution/portainer.spec
|
|
|
|
# Then build with 'rpmbuild -ba distribution/portainer.spec'
|
|
|
|
|
|
|
|
|
2017-10-18 16:08:09 +00:00
|
|
|
%description
|
|
|
|
Portainer is a lightweight management UI which allows you to easily manage
|
|
|
|
your different Docker environments (Docker hosts or Swarm clusters).
|
|
|
|
Portainer is meant to be as simple to deploy as it is to use.
|
|
|
|
It consists of a single container that can run on any Docker engine
|
|
|
|
(can be deployed as Linux container or a Windows native container).
|
|
|
|
Portainer allows you to manage your Docker containers, images, volumes,
|
|
|
|
networks and more ! It is compatible with the standalone Docker engine and with Docker Swarm mode.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qn portainer
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
help2man -N --no-discard-stderr ./portainer > portainer.1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
# Create directory structure
|
|
|
|
install -D -m 0755 portainer %{buildroot}%{_sbindir}/portainer
|
2018-04-03 23:06:02 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_datadir}/portainer/public
|
2017-10-18 16:08:09 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/portainer
|
|
|
|
install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/portainer.service
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
install -D -m 0644 portainer.1 %{buildroot}%{_mandir}/man1/portainer.1
|
|
|
|
( cd %{buildroot}%{_sbindir} ; ln -s service rcportainer )
|
|
|
|
%endif
|
|
|
|
# populate
|
|
|
|
# don't install docker binary with package use system wide installed one
|
2018-04-03 23:06:02 +00:00
|
|
|
cp -ra public/ %{buildroot}%{_datadir}/portainer/
|
2017-10-18 16:08:09 +00:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%service_add_pre portainer.service
|
|
|
|
#%%else # this does not work on rhel 7?
|
|
|
|
#%%systemd_pre portainer.service
|
|
|
|
true
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%service_del_preun portainer.service
|
|
|
|
%else
|
|
|
|
%systemd_preun portainer.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%service_add_post portainer.service
|
|
|
|
%else
|
|
|
|
%systemd_post portainer.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%service_del_postun portainer.service
|
|
|
|
%else
|
|
|
|
%systemd_postun_with_restart portainer.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/portainer
|
2018-04-03 23:06:02 +00:00
|
|
|
%{_datadir}/portainer/public
|
2017-10-18 16:08:09 +00:00
|
|
|
%dir %{_localstatedir}/lib/portainer/
|
|
|
|
%{_unitdir}/portainer.service
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%{_mandir}/man1/portainer.1*
|
|
|
|
%{_sbindir}/rcportainer
|
2018-04-03 23:06:02 +00:00
|
|
|
%endif
|