%global repo PushProx %undefine _missing_build_ids_terminate_build Name: golang-github-robustperception-pushprox Version: 0.1.0 Release: 3%{?dist} Summary: Client and proxy that allows transversing of NAT and other similar network topologies by Prometheus License: ASL 2.0 URL: https://github.com/RobustPerception/PushProx Source0: https://github.com/RobustPerception/PushProx/archive/master.tar.gz Source1: pushprox-client.service Source2: pushprox-client Source3: pushprox-proxy.service Source4: pushprox-proxy # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: golang >= 1.6 BuildRequires: golang-github-prometheus-promu BuildRequires: systemd %description PushProx is a client and proxy that allows transversing of NAT and other similar network topologies by Prometheus, while still following the pull model. %package -n pushprox-proxy Summary: Client and proxy that allows transversing of NAT and other similar network topologies by Prometheus %{?systemd_requires} %description -n pushprox-proxy PushProx is a client and proxy that allows transversing of NAT and other similar network topologies by Prometheus, while still following the pull model. This package contains the proxy. %package -n pushprox-client Summary: Client and proxy that allows transversing of NAT and other similar network topologies by Prometheus %{?systemd_requires} %description -n pushprox-client PushProx is a client and proxy that allows transversing of NAT and other similar network topologies by Prometheus, while still following the pull model. This package contains the client. %prep %setup -q -n %{repo}-master %build sed -i 's/ flags: -mod=vendor -a -tags netgo/ flags: -mod=vendor -a -tags netgo\n ldflags:\n -compressdwarf=false/' .promu.yml GO111MODULE=on promu build -v %install install -d %{buildroot}%{_bindir} install -p -m 0755 pushprox-client %{buildroot}%{_bindir}/pushprox-client install -p -m 0755 pushprox-proxy %{buildroot}%{_bindir}/pushprox-proxy install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pushprox-client install -p -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/pushprox-proxy install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/pushprox-client.service install -p -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/pushprox-proxy.service %post -n pushprox-proxy %systemd_post pushprox-proxy.service %preun -n pushprox-proxy %systemd_preun pushprox-proxy.service %postun -n pushprox-proxy %systemd_postun_with_restart pushprox-proxy.service %post -n pushprox-client %systemd_post pushprox-client.service %preun -n pushprox-client %systemd_preun pushprox-client.service %postun -n pushprox-client %systemd_postun_with_restart pushprox-client.service %files -n pushprox-proxy %license LICENSE %doc README.md %doc .promu.yml %{_bindir}/pushprox-proxy %{_sysconfdir}/sysconfig/pushprox-proxy %{_unitdir}/pushprox-proxy.service %files -n pushprox-client %license LICENSE %doc README.md %doc .promu.yml %{_bindir}/pushprox-client %{_sysconfdir}/sysconfig/pushprox-client %{_unitdir}/pushprox-client.service %changelog * Tue Mar 31 2020 Javier Peña - 0.1.0-3 - Fix systemd unit file for pushprox-proxy * Tue Mar 31 2020 Javier Peña - 0.1.0-2 - Fix sysconfig dir location - Change build params to avoid external linker * Tue Mar 31 2020 Javier Peña - 0.1.0-1 - Initial version