]>
Commit | Line | Data |
---|---|---|
10b0ca12 ER |
1 | %define plugin check_mem |
2 | %include /usr/lib/rpm/macros.perl | |
3 | Summary: Improved check_mem.pl Nagios Plugin | |
4 | Name: monitoring-plugin-%{plugin} | |
5 | Version: 1.0 | |
6 | Release: 1 | |
7 | License: MIT | |
8 | Group: Networking | |
9 | Source0: https://github.com/justintime/nagios-plugins/archive/master/%{plugin}.tar.gz | |
10 | # Source0-md5: 6f2a4cf077b42d101670668ca1fcd77f | |
11 | Source1: %{plugin}.cfg | |
12 | URL: https://github.com/justintime/nagios-plugins | |
13 | BuildRequires: rpm-perlprov >= 4.1-13 | |
14 | BuildRequires: rpmbuild(macros) >= 1.654 | |
15 | Requires: nagios-common | |
16 | BuildArch: noarch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define _sysconfdir /etc/nagios/plugins | |
20 | %define nrpeddir /etc/nagios/nrpe.d | |
21 | %define plugindir %{_prefix}/lib/nagios/plugins | |
22 | ||
23 | %description | |
24 | Revision of check_mem.pl that splits out cache memory from application | |
25 | memory. | |
26 | ||
27 | %prep | |
28 | %setup -qc | |
29 | mv nagios-plugins-*/* . | |
30 | mv check_mem/* . | |
31 | cp -p %{SOURCE1} . | |
32 | ||
33 | %install | |
34 | rm -rf $RPM_BUILD_ROOT | |
35 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{nrpeddir},%{plugindir}} | |
36 | install -p %{plugin}.pl $RPM_BUILD_ROOT%{plugindir}/%{plugin} | |
37 | cp -p %{plugin}.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg | |
38 | ||
39 | %clean | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %files | |
43 | %defattr(644,root,root,755) | |
44 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg | |
45 | %attr(755,root,root) %{plugindir}/%{plugin} |