Name: postfix_exporter Version: 0.5.1 Release: 3%{?dist} Summary: postfix stats exporter License: Apache URL: https://github.com/Hsn723/postfix_exporter Source0: postfix_exporter-%{version}.tar.gz Source1: postfix_exporter.service BuildRequires: golang BuildRequires: systemd-devel %if 0%{?rhel} == 7 BuildREquires: systemd %else BuildRequires: systemd-rpm-macros %endif #Requires: %description A Prometheus exporter for Postfix stats %global debug_package %{nil} %prep %autosetup %build go build -v --tags static_all -o %{name} %install install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %check %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %files %{_bindir}/%{name} %{_unitdir}/%{name}.service #%license #%doc %changelog * Mon Apr 08 2024 Chad Catlett - 0.5.1-3 - Added systemd service file. * Mon Apr 08 2024 Chad Catlett - 0.5.1 - Initial commit