#
# Conditional build:
%bcond_without gd # without statusmap and trends, which require gd library
-%bcond_without epn # without Embedded Perl
+%bcond_with epn # with Embedded Perl
# reeenable when http://tracker.nagios.org/view.php?id=51 is fixed
%bcond_with tests
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.3.1
-Release: 5
+Version: 3.4.3
+Release: 1
License: GPL v2+
Group: Networking
Source0: http://downloads.sourceforge.net/nagios/%{name}-%{version}.tar.gz
-# Source0-md5: c935354ce0d78a63bfabc3055fa77ad5
+# Source0-md5: adb04a255a3bb1574840ebd4a0f2eb76
Source1: %{name}-apache.conf
Source2: %{name}.init
Source3: %{name}.sysconfig
Source7: http://www.google.com/mapfiles/marker.png
# Source7-md5: edefef4bdfc29e1c953694651f05b466
Source8: googlemap.js
+Source9: nagioswall.php
Patch0: %{name}-resources.patch
Patch1: %{name}-iconv-in-libc.patch
Patch2: %{name}-webapps.patch
Patch6: %{name}-googlemap.patch
Patch7: %{name}-doc-usermacros.patch
Patch8: archivelog-timeformat.patch
-Patch9: %{name}-html-Makefile.in.patch
+Patch9: system-magpierss.patch
+Patch10: system-jquery.patch
+Patch11: do-not-fetch-rss.patch
URL: http://www.nagios.org/
BuildRequires: autoconf
BuildRequires: automake
Requires: %{name}-imagepaks
Requires: %{name}-theme
Requires: group(http)
+Requires: jquery
Requires: webapps
Requires: webserver
Requires: webserver(access)
Requires: webserver(cgi)
Requires: webserver(indexfile)
Suggests: %{name}-doc
+Suggests: php-magpierss >= 0.72
%description cgi
CGI webinterface for Nagios.
Summary: Virtual package to handle Nagios theme migration
Group: Applications/WWW
Requires: nagios-theme
+Suggests: nagios-theme-classicui
+Suggests: nagios-theme-exfoliation
+Suggests: nagios-theme-nuvola
Obsoletes: nagios-theme-default < 3.3.1-1.4
%description theme-default
aplicativos para o Nagios.
%prep
-%setup -qc -a4 -n%{name}
+%setup -qc -a4
+mv %{name}/* .
%undos cgi/*.c
%undos include/*.h
%undos base/*
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
+%patch11 -p1
find -name .cvsignore -o -name .gitignore | xargs rm
s,".*/libexec/eventhandlers,"%{_libdir}/%{name}/eventhandlers,
' $(find contrib/eventhandlers -type f)
+%{__sed} -i -e '
+ s,/usr/local/nagios/var/,/var/log/%{name}/,g
+' p1.pl
+
sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf
sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf
--with-checkresult-dir=%{_var}/spool/%{name}/checkresults \
--with-ping_command='/bin/ping -n %%s -c %%d' \
%{!?with_gd:--disable-statusmap --disable-trends} \
+ %{?with_epn:--enable-embedded-perl --with-perlcache} \
%{?with_tests:--enable-libtap} \
--enable-event-broker
%{__make} all
+%if %{with epn}
+%{__make} -C contrib mini_epn
+%endif
+
%{?with_tests:%{__make} test}
%install
INIT_OPTS="" \
COMMAND_OPTS=""
+%if %{with epn}
+mv $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/%{name}}/p1.pl
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p contrib/mini_epn $RPM_BUILD_ROOT%{_bindir}
+%endif
+
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
cp -p %{SOURCE6} $RPM_BUILD_ROOT%{htmldir}/images
cp -p %{SOURCE7} $RPM_BUILD_ROOT%{htmldir}/images
cp -p %{SOURCE8} $RPM_BUILD_ROOT%{htmldir}/images
+cp -p %{SOURCE9} $RPM_BUILD_ROOT%{htmldir}
> $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/passwd
echo 'nagios:' > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/group
%{_examplesdir}/%{name}-%{version}
+# epn
+%if %{with epn}
+%attr(755,root,root) %{_libdir}/%{name}/p1.pl
+%attr(755,root,root) %{_bindir}/mini_epn
+%endif
+
%files common
%defattr(644,root,root,755)
%attr(750,root,nagcmd) %dir %{_sysconfdir}
%{htmldir}/images/favicon.ico
%{htmldir}/images/marker.png
%{htmldir}/images/shadow50.png
+%{htmldir}/nagioswall.php
%files theme-classicui
%defattr(644,root,root,755)
+%exclude %{htmldir}/nagioswall.php
%{htmldir}/*.php
%{htmldir}/includes/*
%{htmldir}/images/*