%global debug_package %{nil} Name: snmp_exporter Version: 0.20.0 Release: 1%{?dist} Summary: A simple hierarchical database supporting plugin data sources License: ASL 2.0 URL: https://prometheus.io Source0: https://github.com/prometheus/%{name}/releases/download/v%{version}/%{name}-%{version}.linux-amd64.tar.gz Source1: %{name}.service Source2: snmp.yml BuildArch: x86_64 %description Prometheus exporter for SNMP metrics exposed by *NIX kernels, written in Go with pluggable metric collectors. %prep %setup -q -n %{name}-%{version}.linux-amd64 %build # Nothing to build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} install -p -m0755 snmp_exporter %{buildroot}%{_bindir} install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -p -D -m 644 %{SOURCE2} %{buildroot}/etc/snmp.yml %files /etc/snmp.yml /usr/lib/systemd/system/%{name}.service %{_bindir}/%{name} %doc NOTICE %license LICENSE %pre useradd -rs /bin/false snmp_exporter &>/dev/null %post %systemd_post %{name}.service %changelog * Fri Mar 5 2021 Breno Brand Fernandes - 1.1.2-1 - First build