%define name nagios-plugins %define version 1.3b1 %define release 2mdk %define nsusr nagios %define nsgrp nagios Summary: Host/service/network monitoring program plugins for Nagios Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Networking/Other URL: http://nagiosplug.sourceforge.net/ Source0: %{name}-%{version}.tar.bz2 Patch0: configure.in.patch.bz2 PreReq: rpm-helper Requires: fileutils Requires: fping Requires: gawk Requires: grep Requires: libdb3.3 Requires: libldap2 Requires: libmysql10 Requires: libopenssl0 Requires: libpgsql2 Requires: libpython2.2 Requires: libradius0 Requires: libsasl7 Requires: ntp Requires: pam Requires: perl Requires: python Requires: samba-client Requires: shadow-utils Requires: textutils Requires: traceroute Requires: ucd-snmp-utils Requires: zlib1 BuildRequires: libmysql10-devel BuildRequires: postgresql-devel BuildRequires: libldap2-devel BuildRequires: libradius0-devel BuildRequires: libopenssl0-devel BuildRequires: libdb3.3-devel BuildRoot: %{_tmppath}/%{name}-buildroot Obsoletes: netsaint-plugins Provides: netsaint-plugins %description Nagios is a program that will monitor hosts and services on your network, and to email or page you when a problem arises or is resolved. Nagios runs on a Unix server as a background or daemon 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. This package contains the basic plugins necessary for use with the Nagios package. This package should install cleanly on almost any RPM-based system. %prep %setup -q -n %{name} %patch0 -p0 libtoolize --copy --force; autoconf-2.13; autoheader-2.13; automake %build %serverbuild # this is one of the wierdest configure line and build I have ever done... ./configure \ --prefix=%{_libdir}/nagios/plugins \ --libexecdir=%{_libdir}/nagios/plugins \ --with-cgiurl=/nagios/cgi-bin \ --with-nagios-user=%{nsusr} \ --with-nagios-grp=%{nsgrp} \ --with-trusted-path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" \ --with-openssl=%{_includedir}/openssl \ --with-pgsql=%{_includedir}/pgsql \ --with-mysqllibdir=%{_includedir}/mysql \ --with-df-command="/bin/df -Pk" \ --with-ping-command="/bin/ping -n %s -c %d" make CFLAGS="%{optflags}" \ LDFLAGS="-L%{_libdir} -I%{_includedir}/ldap -I%{_includedir}/mysql -I%{_includedir}/pgsql -I%{_includedir}/openssl" make %install [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=%{buildroot} install cd contrib find . -type f -exec /usr/bin/perl -e 's/^#!\/usr\/local\/bin\/perl/#!\/usr\/bin\/perl/gi' -p -i \{\} \; find . -type f -exec /usr/bin/perl -e 's/^#!\/nyet\/bin\/perl/#!\/usr\/bin\/perl/gi' -p -i \{\} \; install -d %{buildroot}%{_libdir}/nagios/plugins/contrib install -m755 check* %{buildroot}%{_libdir}/nagios/plugins/contrib/ rm %{buildroot}%{_libdir}/nagios/plugins/contrib/*.c %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS ChangeLog FAQ INSTALL NEWS README REQUIREMENTS %doc command.cfg %defattr(755,root,root) %dir %{_libdir}/nagios/plugins %{_libdir}/nagios/plugins/* %changelog * Sun Sep 15 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.3b1-2mdk - fixed the invalid ping command and call automake not automake-1.4, pointed out by Guillaume Bourque. * Thu Aug 15 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.3b1-1mdk - initial cooker contrib