]> git.pld-linux.org Git - projects/template-specs.git/blob - nagios-plugin.spec
- @plugindir@ subst sample
[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 #Patch0:                %{name}-defaultpass.patch
12 URL:            -
13 Requires:       nagios-core
14 BuildArch:      noarch
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         _sysconfdir     /etc/nagios/plugins
18 %define         plugindir       %{_prefix}/lib/nagios/plugins
19
20 %description
21 Nagios plugin to check ...
22
23 %description -l pl.UTF-8
24 Wtyczka Nagiosa sprawdzająca ...
25
26 %prep
27 %setup -qcT
28 install %{SOURCE0} %{plugin}
29 #%patch0 -p1
30
31 cat > nagios.cfg <<'EOF'
32 # Usage:
33 # %{plugin}
34 define command {
35         command_name    %{plugin}
36         command_line    %{plugindir}/%{plugin}
37 }
38 EOF
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
43 install %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
44 cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
45 sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
46
47 %clean
48 rm -rf $RPM_BUILD_ROOT
49
50 %files
51 %defattr(644,root,root,755)
52 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
53 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.036105 seconds and 4 git commands to generate.