%define _libexecdir %{_libdir}/nagios/plugins %define extraplugins check_cluster check_dhcp Summary: Host/service/network monitoring program plugins for Nagios. Name: nagios-plugins Version: 1.3.1 Release: 5.ker.rhel3 License: GPL Group: Applications/System URL: http://nagiosplug.sourceforge.net/ Source: http://nagiosplug.sourceforge.net/src/%{name}-%{version}.tar.gz Prefix: %{_prefix} BuildRoot: %{_tmppath}/root-%{name}-%{version} BuildRequires: fping radiusclient-devel mysql-devel postgresql-devel BuildRequires: net-snmp-devel openssl-devel bind-devel openldap-devel BuildRequires: bind-utils ntp samba-client openssh-clients qstat #AutoReq: no Requires: perl python fping radiusclient Requires: mysql rh-postgresql-libs net-snmp net-snmp-perl Requires: perl-CGI 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 %description This package contains the basic plugins necessary for use with the Nagios or nrpe (remote check for Nagios) package. %prep %setup -q # 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 %{__install} -m0755 contrib/check* %{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} %changelog * 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