]> git.pld-linux.org Git - projects/template-specs.git/blame - nagios-plugin.spec
- use same perms as in base nagios-plugins package
[projects/template-specs.git] / nagios-plugin.spec
CommitLineData
2ec158f4 1%define plugin check_template
f8e85385 2Summary: Nagios plugin to check ...
4ef9307b 3Summary(pl.UTF_8): Wtyczka Nagiosa sprawdzająca ...
2ec158f4 4Name: nagios-plugin-%{plugin}
f8e85385
ER
5Version: 0.1
6Release: 0.1
7License: - (enter GPL/GPL v2/LGPL/BSD/BSD-like/other license name here)
8Group: Networking
9#Source0: -
560a5433 10# Source0-md5: -
ec71bcc4 11Source1: %{plugin}.cfg
f8e85385
ER
12#Patch0: %{name}-defaultpass.patch
13URL: -
0053fd7e 14Requires: nagios-common
c2a7fbf7
ER
15# Requires: nagios-plugins-libs for utils.{sh,pm,php}
16#Requires: nagios-plugins-libs
f8e85385
ER
17BuildArch: noarch
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
f8e85385 20%define _sysconfdir /etc/nagios/plugins
2ec158f4 21%define plugindir %{_prefix}/lib/nagios/plugins
f8e85385
ER
22
23%description
4ef9307b
JB
24Nagios plugin to check ...
25
26%description -l pl.UTF-8
27Wtyczka Nagiosa sprawdzająca ...
f8e85385
ER
28
29%prep
30%setup -qcT
ec71bcc4 31cp -p %{SOURCE0} %{plugin}
f8e85385
ER
32#%patch0 -p1
33
34cat > nagios.cfg <<'EOF'
35# Usage:
2ec158f4 36# %{plugin}
f8e85385 37define command {
2ec158f4 38 command_name %{plugin}
ec71bcc4 39 command_line %{plugindir}/%{plugin} $ARG1$
f8e85385
ER
40}
41EOF
42
43%install
44rm -rf $RPM_BUILD_ROOT
2ec158f4 45install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
ec71bcc4 46install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
2ec158f4 47cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
e309ea82 48sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
f8e85385
ER
49
50%clean
51rm -rf $RPM_BUILD_ROOT
52
53%files
54%defattr(644,root,root,755)
c4c68295 55%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
2ec158f4 56%attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.038756 seconds and 4 git commands to generate.