]> git.pld-linux.org Git - projects/template-specs.git/blame - nagios-plugin.spec
- simple noarch template for nagios plugin
[projects/template-specs.git] / nagios-plugin.spec
CommitLineData
f8e85385
ER
1%define _plugin check_template
2Summary: Nagios plugin to check ...
3Name: nagios-plugin-%{_plugin}
4Version: 0.1
5Release: 0.1
6License: - (enter GPL/GPL v2/LGPL/BSD/BSD-like/other license name here)
7Group: Networking
8#Source0: -
9# Source0-md5: af8da7807e1a03bf301fa70658fb08c3
10#Patch0: %{name}-defaultpass.patch
11URL: -
12Requires: nagios-core
13BuildArch: noarch
14BuildRoot: %{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
23install %{SOURCE0} %{_plugin}
24#%patch0 -p1
25
26cat > nagios.cfg <<'EOF'
27# Usage:
28# %{_plugin}
29define command {
30 command_name %{_plugin}
31 command_line %{_plugindir}/%{_plugin}
32}
33EOF
34
35%install
36rm -rf $RPM_BUILD_ROOT
37install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_plugindir}}
38install %{_plugin} $RPM_BUILD_ROOT%{_plugindir}/%{_plugin}
39cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{_plugin}.cfg
40
41%clean
42rm -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}
This page took 0.059544 seconds and 4 git commands to generate.