%define _libexecdir %{_libdir}/nagios/plugins %define extraplugins check_cluster Summary: Host/service/network monitoring program plugins for Nagios. Name: nagios-plugins Version: 1.4.1 Release: 2.%{mysig} License: GPL Group: Applications/System URL: http://nagiosplug.sourceforge.net/ Source: http://nagiosplug.sourceforge.net/src/%{name}-%{version}.tar.gz Patch1: nagios-plugins-1.4-psfix.patch Prefix: %{_prefix} BuildRoot: %{_tmppath}/root-%{name}-%{version} BuildRequires: fping mysql-devel postgresql-devel BuildRequires: net-snmp-devel openssl-devel bind-devel openldap-devel BuildRequires: bind-utils ntp samba-client openssh-clients #AutoReq: no #Requires: perl python fping #Requires: mysql postgresql-libs net-snmp net-snmp-perl #Requires: perl-Crypt-DES perl-DBD-MySQL perl-DBI perl-Digest-HMAC #Requires: perl-Digest-SHA1 perl-HTML-Parser perl-HTML-Tagset perl-libwww-perl #Requires: perl-Net-SNMP perl-URI Requires: perl-Net-SNMP %description This package contains the basic plugins necessary for use with the Nagios or nrpe (remote check for Nagios) package. %prep %setup -q #%patch1 -p1 -b .psfix # Change to real perl and plugins location find contrib -type f -exec %{__perl} -pi -e ' s|^#!/.*bin/perl|#!%{__perl}|i; s|/usr/local/nagios/libexec/|%{_libdir}/nagios/plugins/|; s|/usr/libexec/nagios/plugins/|%{_libdir}/nagios/plugins/|; ' {} \; %build %configure \ --with-cgiurl="/nagios/cgi-bin" # I see no reason to own files for nagios user # This could lead to security problem only (?) # --with-nagios-user="nagios" \ # --with-nagios-group="nagios" %{__make} %{?_smp_mflags} ### Build some contrib plugins for plugin in %{extraplugins}; do ${CC:-%{__cc}} %{optflags} -o $plugin contrib/$plugin.c #%{__rm} -f contrib/$plugin.c done %install %{__rm} -rf %{buildroot} %makeinstall %{__install} -d -m0755 %{buildroot}%{_libdir}/nagios/plugins/contrib/ \ %{buildroot}%{perl_archlib} \ %{buildroot}%{_sysconfdir}/nagios/ %{__install} -m0755 %{extraplugins} %{buildroot}%{_libdir}/nagios/plugins/ # we don't need Oracle because we don't have Oracle libs and perl-DBD-Oracle rm -f contrib/check_oracle_instance.pl # we don't want this because we don't have cricket with RRD::File.pm rm -f contrib/check_rrd_data.pl # we don't want this because strange dependency perl(a) rm -f contrib/check_snmp_process_monitor.pl # perl-Net-Arping does not compile rm -f contrib/check_arping.pl # we don't have snmputil module for perl rm -f contrib/check_fan_cpq_present contrib/check_fan_fsc_present contrib/check_temp_cpq contrib/check_temp_fsc %{__install} -m0755 contrib/check* %{buildroot}%{_libdir}/nagios/plugins/contrib/ # delete uncompiled *.c files rm -vf %{buildroot}%{_libdir}/nagios/plugins/contrib/*.c %{__install} -m0755 contrib/*.pm %{buildroot}%{_libdir}/nagios/plugins/contrib/ %{__install} -m0644 plugins-scripts/utils.pm %{buildroot}%{perl_archlib} %{__install} -m0644 command.cfg %{buildroot}%{_sysconfdir}/nagios/command-plugins.cfg %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING NEWS README REQUIREMENTS command.cfg %config(noreplace) %{_sysconfdir}/nagios/ %{_libdir}/nagios/plugins/ %{perl_archlib} %{_datadir}/locale/*/*/nagios-plugins.mo %changelog * Tue Sep 06 2005 Milan Kerslager 1.4.1-2.ker.rhel4 - do not include uncompiled *.c files - TODO: contrib/check_http-with-client-certificate.c, contrib/check_arping.pl * Mon Aug 22 2005 Milan Kerslager 1.4.1-1.ker.rhel4 - updated to the latest release * Fri Mar 04 2005 Milan Kerslager 1.4-2.ker.rhel4 - fix 'ps -axwo' as 'ps axwo' * Wed Feb 23 2005 Milan Kerslager 1.4-1.ker.rhel4 - rebuild for RHEL4 - updated to the latest release - check_dhcp is now in main directory - pack locale files - remove radiusclient and qstat dependency/build * Wed Apr 22 2004 Milan Kerslager 1.3.1-5.ker.rhel3 - do not require nagios (we need only nrpe on the nagios client machine) - remove contrib/check_oracle_instance.pl, contrib/check_rrd_data.pl contrib/check_snmp_process_monitor.pl because uresolved/broken dependency - use autodependency generator - some Requires: and BuildRequires: added - revert to root owner - wrong Requires (bind-devel openldap-devel) * Mon Feb 16 2004 Milan Kerslager 1.3.1-2.ker.rhel3 - rebuild * Thu Dec 18 2003 Milan Kerslager 1.3.1-1_WB3 - rebuild for WhiteBoxLinux 3.0 - based on Dag package