%global commit 1a2339d67e733075174a8a38b5464f0260cb81d0 %global short_commit %(c=%{commit}; echo ${c:0:7}) %global commit_date 20170825 %global nagiospluginsdir %{_libdir}/nagios/plugins # No binaries in this package %global debug_package %{nil} Name: nagios-plugins-haproxy Version: 1.0.3 Release: 2.%{commit_date}git%{short_commit}%{?dist} Summary: Nagios plugin for monitoring HAProxy services Group: Applications/System License: GPLv2+ URL: https://github.com/jonathanio/monitoring-nagios-haproxy/ Source0: https://github.com/jonathanio/monitoring-nagios-haproxy/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz # Fix default HAProxy socket path Patch0: %{name}-1.0.3-socket_path.patch BuildRequires: perl-generators Requires: nagios-common %description This is a Nagios plugin to check the status of HAProxy over a socket connection and parse the statistics to ensure that it is operating within accepted limits, as per the defaults, or as set for each frontend/backend. %prep %autosetup -n monitoring-nagios-haproxy-%{commit} %build %install install -Dpm 0755 check_haproxy $RPM_BUILD_ROOT%{nagiospluginsdir}/check_haproxy %files %doc README.md %license LICENSE %{nagiospluginsdir}/check_haproxy %changelog * Sat Oct 14 2017 Mohamed El Morabity - 1.0.3-2.20170825git1a2339d - Update to latest snapshot * Tue Jul 25 2017 Mohamed El Morabity - 1.0.3-1.20151020git85e1c1a - Initial RPM release