]>
Commit | Line | Data |
---|---|---|
f8e85385 ER |
1 | %define _plugin check_template |
2 | Summary: Nagios plugin to check ... | |
3 | Name: nagios-plugin-%{_plugin} | |
4 | Version: 0.1 | |
5 | Release: 0.1 | |
6 | License: - (enter GPL/GPL v2/LGPL/BSD/BSD-like/other license name here) | |
7 | Group: Networking | |
8 | #Source0: - | |
9 | # Source0-md5: af8da7807e1a03bf301fa70658fb08c3 | |
10 | #Patch0: %{name}-defaultpass.patch | |
11 | URL: - | |
12 | Requires: nagios-core | |
13 | BuildArch: noarch | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %define _plugindir %{_prefix}/lib/nagios/plugins | |
17 | %define _sysconfdir /etc/nagios/plugins | |
18 | ||
19 | %description | |
20 | ||
21 | %prep | |
22 | %setup -qcT | |
23 | install %{SOURCE0} %{_plugin} | |
24 | #%patch0 -p1 | |
25 | ||
26 | cat > nagios.cfg <<'EOF' | |
27 | # Usage: | |
28 | # %{_plugin} | |
29 | define command { | |
30 | command_name %{_plugin} | |
31 | command_line %{_plugindir}/%{_plugin} | |
32 | } | |
33 | EOF | |
34 | ||
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
37 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_plugindir}} | |
38 | install %{_plugin} $RPM_BUILD_ROOT%{_plugindir}/%{_plugin} | |
39 | cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{_plugin}.cfg | |
40 | ||
41 | %clean | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | ||
44 | %files | |
45 | %defattr(644,root,root,755) | |
46 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{_plugin}.cfg | |
47 | %attr(755,root,root) %{_plugindir}/%{_plugin} |