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.

77 lines
2.1 KiB

Name: traefik
Version: 2.3.4
Release: itix2
Summary: The Cloud Native Application Proxy
License: MIT
Source0: https://github.com/traefik/%{name}/releases/download/v%{version}/%{name}_v%{version}_linux_amd64.tar.gz
ExclusiveArch: x86_64
Source1: traefik.service
Source2: traefik.yaml
Requires(pre): shadow-utils
BuildRequires: systemd
%description
Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer
that makes deploying microservices easy. Traefik integrates with your existing
infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul,
Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and
dynamically. Pointing Traefik at your orchestrator should be the only
onfiguration step you need.
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c
cp %{S:1} %{name}.service
cp %{S:2} %{name}.yaml
%build
%install
install -d %{buildroot}/opt/%{name}/etc/
install -d %{buildroot}/opt/%{name}/etc/conf.d
install -d %{buildroot}/srv/%{name}/
install -D traefik %{buildroot}/opt/%{name}/bin/traefik
install -D -m 0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 %{name}.yaml %{buildroot}/opt/%{name}/etc/%{name}.yaml
touch %{buildroot}/opt/%{name}/etc/%{name}.env
%files
%defattr(0755, root, root, 0755)
/opt/%{name}/bin/traefik
%defattr(0644, root, root, 0755)
%dir /opt/%{name}/bin
%{_unitdir}/%{name}.service
%dir /opt/%{name}/etc
%dir /opt/%{name}/etc/conf.d
%config(noreplace) /opt/%{name}/etc/%{name}.yaml
%config(noreplace) /opt/%{name}/etc/%{name}.env
%defattr(0600, traefik, itix-svc, 0700)
%dir /srv/%{name}
%pre
getent group itix-svc >/dev/null || groupadd -r itix-svc
getent passwd %{name} >/dev/null || useradd -r -g itix-svc \
-d /srv/%{name} -s /sbin/nologin -c "The Cloud Native Application Proxy" \
%{name}
exit 0
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%changelog