# Generated by go2rpm 1.3 %bcond_without check # https://github.com/theoapp/theo-agent %global goipath github.com/theoapp/theo-agent Version: 0.14.0 %gometa %global common_description %{expand: theo-agent is the command line program used to fetch authorized_keys from a Theo server.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: 1%{?dist} Summary: Theo authorized keys manager agent # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} Source1: theo-agent.sysusers BuildRequires: golang(github.com/hashicorp/go-syslog) BuildRequires: golang(golang.org/x/crypto/ssh) BuildRequires: golang(gopkg.in/yaml.v2) BuildRequires: systemd-rpm-macros %description %{common_description} %package -n theo-agent Summary: %{summary} Recommends: openssh-server %description -n theo-agent %{common_description} %gopkg %prep %goprep %build export LDFLAGS="-X %{goipath}/common.NAME=theo-agent -X %{goipath}/common.VERSION=%{version} -X %{goipath}/common.BUILT=$(date -u +%%Y-%%m-%%dT%%H:%%M:%%S%%z) " %gobuild -o %{gobuilddir}/bin/theo-agent %{goipath} %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/theo-agent.conf install -d -m 0755 %{buildroot}%{_sysconfdir}/theo-agent %if %{with check} %check %gocheck %endif %pre %sysusers_create_compat %{SOURCE1} %files -n theo-agent %license LICENSE %doc README.md %{_bindir}/* %dir %{_sysconfdir}/theo-agent %{_sysusersdir}/theo-agent.conf %gopkgfiles %changelog * Sat Apr 24 2021 Davide Cavalca - 0.14.0-1 - Initial package