]> git.pld-linux.org Git - packages/nagios-nrpe.git/blobdiff - nagios-nrpe.spec
- define libexecdir (passed to configure) instead of second --libexecdir
[packages/nagios-nrpe.git] / nagios-nrpe.spec
index b5e972924ed9c05253f0e71518885d6067a75eba..97833a2037f414b3a9ad1d95648286b471eb8c1f 100644 (file)
@@ -1,77 +1,57 @@
-#
-# Conditional build:
-#
-Summary:       Nagios remote monitoring service/plugin
-Summary(pl):   Demon i wtyczka zdalnego monitorowania Nagios
-Name:          nrpe
+Summary:       Nagios remote plugin execution service/plugin
+Summary(pl):   Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
+Name:          nagios-nrpe
 Version:       2.0
-Release:       1
+Release:       5
 License:       GPL v2
 Group:         Networking
 Source0:       http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
-Source1:       %{name}.init
+# Source0-md5: 70ef9502a3b7e49fa520dbceabfa04d0
+Source1:       nrpe.init
 URL:           http://www.nagios.org/
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Requires(pre): /usr/bin/getgid
-Requires(pre): /bin/id
-Requires(pre): /usr/sbin/groupadd
-Requires(pre): /usr/sbin/useradd
+BuildRequires: openssl-tools
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires(post,postun): /sbin/chkconfig
+Requires:      nagios-common
 Requires:      nagios-plugins
+Requires:      rc-scripts
+Provides:      nagios-core
+Obsoletes:     netsaint-nrpe
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/nagios
 %define                _datadir        %{_prefix}/share/%{name}
 %define                _plugindir      %{_libdir}/nagios/plugins
+%define                _libexecdir     %{_plugindir}
 %define                _localstatedir  %{_var}/log/nagios
-%define        nsusr           nagios
-%define                nsgrp           nagios
 %define                nsport          5666
 
 %description
-Nagios is a program that will monitor hosts and services on your
-network. It has the ability to email or page you when a problem arises
-and when a problem is resolved. Nagios is written in C and is designed
-to run under Linux (and some other *NIX variants) as a background
-process, intermittently running checks on various services that you
-specify.
-
-The actual service checks are performed by separate "plugin" programs
-which return the status of the checks to Nagios. The plugins are
-available in nagios-plugins packages.
-
-Nagios is successor to NetSaint.
+Nagios nrpe allows you to remotely execute plugins on other hosts and
+report the plugin output back to the monitoring host.
 
 %description -l pl
-Nagios to program, który monitoruje serwery oraz us³ugi w naszej
-sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
-rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
-zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
-jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
-sprawdzaj±ce.
-
-W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
-("wtyczki"), które zwracaj± informacje o statusie do Nagiosa. Wtyczki
-s± dostêpne na stronie w pakietach nagios-plugins.
-
-Nagios jest nastêpc± NetSainta.
+Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach, a
+wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego.
 
 %package plugin
 Summary:       check_nrpe plugin for Nagios
 Summary(pl):   Wtyczka check_nrpe dla Nagiosa
 Group:         Networking
+Requires:      nagios-core
 
 %description plugin
 check_nrpe plugin for Nagios. This plugin allows running plugins on
 remote machines using nrpe service.
 
 %description plugin -l pl
-Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
-wtyczek na innych komputerach za pomoc± demona nrpe.
+Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
+na innych komputerach za pomoc± demona nrpe.
 
 %prep
-%setup -q
+%setup -q -n nrpe-%{version}
 
 %build
 %{__aclocal}
@@ -80,15 +60,8 @@ wtyczek na innych komputerach za pomoc
 %configure \
        --with-init-dir=/etc/rc.d/init.d \
        --with-nrpe-port=%{nsport} \
-       --with-nrpe-user=%{nsusr} \
-       --with-nrpe-grp=%{nsgrp} \
-       --prefix=%{_prefix} \
-       --exec-prefix=%{_sbindir} \
-       --bindir=%{_sbindir} \
-       --libexecdir=%{_plugindir} \
-       --datadir=%{_prefix}/share/nagios \
-       --sysconfdir=%{_sysconfdir} \
-       --localstatedir=%{_localstatedir} 
+       --with-nrpe-user=nagios \
+       --with-nrpe-grp=nagios \
 
 %{__make} all
 
@@ -97,61 +70,35 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
        $RPM_BUILD_ROOT%{_localstatedir}
 
-install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%pre
-if [ -n "`getgid %{nsgrp}`" ]; then
-       if [ "`getgid %{nsgrp}`" != "72" ]; then
-               echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 72 -f %{nsgrp}
-fi
-if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
-       if [ "`id -u %{nsusr}`" != "72" ]; then
-               echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
-fi
-
 %post
-/sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
+/sbin/chkconfig --add nrpe
+if [ -f /var/lock/subsys/nrpe ]; then
+       /etc/rc.d/init.d/nrpe restart 1>&2
 fi
 
 %preun
 if [ "$1" = "0" ] ; then
-       if [ -f /var/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop 1>&2
+       if [ -f /var/lock/subsys/nrpe ]; then
+               /etc/rc.d/init.d/nrpe stop 1>&2
        fi
-       /sbin/chkconfig --del %{name}
-fi
-
-%postun
-if [ "$1" = "0" ]; then
-       /usr/sbin/userdel %{nsusr}
-       /usr/sbin/groupdel %{nsgrp}
+       /sbin/chkconfig --del nrpe
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc Changelog LEGAL README* SECURITY
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
-%attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
+%attr(754,root,root) /etc/rc.d/init.d/nrpe
+%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
 %attr(755,root,root) %{_sbindir}/nrpe
 
 %files plugin
 %defattr(644,root,root,755)
-%dir %{_plugindir}
 %attr(755,root,root) %{_plugindir}/*
This page took 0.073276 seconds and 4 git commands to generate.