%define debug_package %{nil} Name: pcp-mmvstatsd Version: 0.4 Release: 3%{?dist} Summary: Statsd to PCP MMV aggregator License: MIT and BSD URL: https://github.com/lzap/%{name} Source0: https://codeload.github.com/lzap/%{name}/tar.gz/%{version}#/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}.default ExclusiveArch: %{golang_arches} %{?systemd_requires} BuildRequires: systemd BuildRequires: golang Requires(pre): shadow-utils Requires: pcp %description Aggregates statsd packets recieved via UDP or TCP and sends them into PCP via MMV API. %prep %setup -q %build # vendoring won't work outside of GOPATH mkdir -p _gopath/src ln -fs $(pwd) _gopath/src export GOPATH=$(pwd)/_gopath pushd _gopath/src/%{name}-%{version} go build strip %{name}-%{version} popd %install mkdir -vp %{buildroot}%{_sharedstatedir}/%{name} install -D -m 755 _gopath/src/%{name}-%{version}/%{name}-%{version} %{buildroot}%{_bindir}/%{name} install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/default/%{name} %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ -c "Prometheus services" %{name} exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/default/%{name} %attr(755, %{name}, %{name})%{_sharedstatedir}/%{name} %changelog * Sun Nov 30 2025 Ewoud Kohl van Wijngaarden - 0.4-3 - Use OS provided golang_arches macro * Fri Sep 14 2018 Lukas Zapletal 0.4-2 - Added debuginfo stripping * Tue Jun 19 2018 Lukas Zapletal 0.4-1 - Initial version