%global goipath github.com/thomseddon/traefik-forward-auth Version: 2.2.0 %gometa %global common_description %{expand: Minimal forward authentication service that provides Google/OpenID oauth based login and authentication for the traefik reverse proxy} %global golicenses LICENSE.md Name: traefik-forward-auth Release: itix1 Summary: Minimal forward authentication service for the traefik reverse proxy License: MIT ExclusiveArch: x86_64 URL: %{gourl} Source0: %{gosource} Source1: traefik-forward-auth.service Source2: traefik-forward-auth.conf Requires: traefik BuildRequires: systemd BuildRequires: go-rpm-macros %description %{common_description} %global _missing_build_ids_terminate_build 0 %global _build_id_links none %global debug_package %{nil} %prep %goprep cp %{S:1} %{name}.service cp %{S:2} %{name}.conf %build CGO_ENABLED=0 GO111MODULE=on go build -o %{gobuilddir}/traefik-forward-auth %{goipath}/cmd %install install -D %{gobuilddir}/traefik-forward-auth %{buildroot}/opt/traefik/bin/traefik-forward-auth install -D -m 0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service install -D -m 0644 %{name}.conf %{buildroot}/opt/traefik/etc/%{name}.conf touch %{buildroot}/opt/traefik/etc/%{name}.env %files %license LICENSE.md %attr(0755, root, root) /opt/traefik/bin/traefik-forward-auth %attr(0644, root, root) %{_unitdir}/%{name}.service %defattr(0600, traefik, itix-svc, 0700) %config(noreplace) /opt/traefik/etc/%{name}.conf %config(noreplace) /opt/traefik/etc/%{name}.env %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %changelog * Mon Feb 22 2021 Nicolas MASSE - 2.2.0-itix1 - First release