]> git.pld-linux.org Git - packages/nagios-nrpe.git/blob - nagios-nrpe.spec
- requires nagios-common for base dirs and uid/gid
[packages/nagios-nrpe.git] / nagios-nrpe.spec
1 Summary:        Nagios remote plugin execution service/plugin
2 Summary(pl):    Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
3 Name:           nagios-nrpe
4 Version:        2.0
5 Release:        2.7
6 License:        GPL v2
7 Group:          Networking
8 Source0:        http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9 # Source0-md5:  70ef9502a3b7e49fa520dbceabfa04d0
10 Source1:        nrpe.init
11 URL:            http://www.nagios.org/
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  rpmbuild(macros) >= 1.202
15 BuildRequires:  openssl-tools
16 PreReq:         nagios-common
17 Requires(pre):  /usr/bin/getgid
18 Requires(pre):  /bin/id
19 Requires(pre):  /usr/sbin/groupadd
20 Requires(pre):  /usr/sbin/useradd
21 Requires(post,postun):  /sbin/chkconfig
22 Requires:       nagios-plugins
23 Provides:       nagios-core
24 Obsoletes:      netsaint-nrpe
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _sysconfdir     /etc/nagios
28 %define         _datadir        %{_prefix}/share/%{name}
29 %define         _plugindir      %{_libdir}/nagios/plugins
30 %define         _localstatedir  %{_var}/log/nagios
31 %define         nsport          5666
32
33 %description
34 Nagios nrpe allows you to remotely execute plugins on other hosts
35 and report the plugin output back to the monitoring host.
36
37 %description -l pl
38 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
39 a wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego.
40
41 %package plugin
42 Summary:        check_nrpe plugin for Nagios
43 Summary(pl):    Wtyczka check_nrpe dla Nagiosa
44 Group:          Networking
45 Requires:       nagios-core
46
47 %description plugin
48 check_nrpe plugin for Nagios. This plugin allows running plugins on
49 remote machines using nrpe service.
50
51 %description plugin -l pl
52 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
53 wtyczek na innych komputerach za pomoc± demona nrpe.
54
55 %prep
56 %setup -q -n nrpe-%{version}
57
58 %build
59 %{__aclocal}
60 %{__autoconf}
61
62 %configure \
63         --with-init-dir=/etc/rc.d/init.d \
64         --with-nrpe-port=%{nsport} \
65         --with-nrpe-user=nagios \
66         --with-nrpe-grp=nagios \
67         --prefix=%{_prefix} \
68         --exec-prefix=%{_sbindir} \
69         --bindir=%{_sbindir} \
70         --libexecdir=%{_plugindir} \
71         --datadir=%{_prefix}/share/nagios \
72         --sysconfdir=%{_sysconfdir} \
73         --localstatedir=%{_localstatedir} 
74
75 %{__make} all
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
80         $RPM_BUILD_ROOT%{_localstatedir}
81
82 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
83 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
84 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
85 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 /sbin/chkconfig --add nrpe
92 if [ -f /var/lock/subsys/nrpe ]; then
93         /etc/rc.d/init.d/nrpe restart 1>&2
94 fi
95
96 %preun
97 if [ "$1" = "0" ] ; then
98         if [ -f /var/lock/subsys/nrpe ]; then
99                 /etc/rc.d/init.d/nrpe stop 1>&2
100         fi
101         /sbin/chkconfig --del nrpe
102 fi
103
104 %files
105 %defattr(644,root,root,755)
106 %doc Changelog LEGAL README* SECURITY
107 %attr(754,root,root) /etc/rc.d/init.d/nrpe
108 %attr(640,root,nagios) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
109 %attr(755,root,root) %{_sbindir}/nrpe
110
111 %files plugin
112 %defattr(644,root,root,755)
113 %dir %{_plugindir}
114 %attr(755,root,root) %{_plugindir}/*
This page took 0.232669 seconds and 4 git commands to generate.