#
# Conditional build:
%bcond_without gd # without statusmap and trends, which require gd library
+# reeenable when http://tracker.nagios.org/view.php?id=51 is fixed
+%bcond_with tests
#
Summary: Host/service/network monitoring program
Summary(pl.UTF-8): Program do monitorowania serwerów/usług/sieci
Summary(pt_BR.UTF-8): Programa para monitoração de máquinas e serviços
Name: nagios
-Version: 3.0.5
+Version: 3.1.2
Release: 1
License: GPL v2
Group: Networking
Source0: http://dl.sourceforge.net/nagios/%{name}-%{version}.tar.gz
-# Source0-md5: c607ffd5f4574cbea345bdf2e02dc480
+# Source0-md5: f3c60428cba14264c709749182b8d93e
Source1: %{name}-apache.conf
Source2: %{name}.init
Source3: %{name}.sysconfig
Summary: Default Nagios theme
Summary(pl.UTF-8): Domyślny motyw Nagiosa
Group: Applications/WWW
+Requires: webserver(php)
Requires: nagios-cgi = %{version}-%{release}
Provides: nagios-theme
Obsoletes: nagios-theme
%{__aclocal}
%{__autoconf}
%configure \
+ --datarootdir=%{_datadir} \
--with-nagios-user=%{name} \
--with-nagios-grp=%{name} \
--with-command-user=%{name} \
--with-command-grp=%{name} \
--with-lockfile=%{_localstatedir}/%{name}.pid \
--with-ping_command='/bin/ping -n %%s -c %%d' \
- --enable-event-broker \
- %{!?with_gd:--disable-statusmap --disable-trends}
+ %{!?with_gd:--disable-statusmap --disable-trends} \
+ %{?with_tests:--enable-libtap} \
+ --enable-event-broker
%{__make} all
+%{?with_tests:%{__make} test}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_webapps}/%{_webapp}} \
fi
%pre common
-if [ "`getgid netsaint`" = "72" ]; then
+if [ "`getgid netsaint 2>/dev/null`" = "72" ]; then
/usr/sbin/groupmod -n nagios netsaint
fi
%groupadd -g 72 nagios
%attr(755,root,root) %{_sbindir}/*.cgi
%dir %{_datadir}
+%dir %{_datadir}/includes
%dir %{_datadir}/images
%dir %{_datadir}/stylesheets
%{_datadir}/favicon.ico
%files theme-default
%defattr(644,root,root,755)
-%{_datadir}/*.html
+%{_datadir}/*.php
+%{_datadir}/includes/*
%{_datadir}/images/*
%{_datadir}/stylesheets/*