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