%global commit b330244c17ca097e2b700e5c6acacee84972de78
%global short_commit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20170712

%global nagiospluginsdir %{_libdir}/nagios/plugins

# No binaries in this package
%global debug_package %{nil}

Name:           nagios-plugins-memory
Version:        0
Release:        0.2.%{commit_date}git%{short_commit}%{?dist}
Summary:        A Nagios plugin to monitor memory utilization

Group:          Applications/System
License:        MIT
URL:            https://github.com/jasonhancock/nagios-memory/
Source0:        https://github.com/jasonhancock/nagios-memory/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz

BuildRequires:  perl-generators
Requires:       nagios-common

%description
%{summary}.


%prep
%autosetup -n nagios-memory-%{commit}


%build


%install
install -Dpm 0755 plugins/check_mem $RPM_BUILD_ROOT%{nagiospluginsdir}/check_mem


%files
%doc README.md example-images/
%{nagiospluginsdir}/check_mem


%changelog
* Sat Oct 14 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0-0.2.20170712gitb330244
- Update to latest snapshot

* Tue May 30 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0-0.1.20160509git8887493
- Initial RPM release