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