diff --git a/pnp4nagios.spec b/pnp4nagios.spec index 9c3d864..6f857c7 100644 --- a/pnp4nagios.spec +++ b/pnp4nagios.spec @@ -1,6 +1,6 @@ Name: pnp4nagios Version: 0.6.15 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Nagios performance data analysis tool Group: Applications/System @@ -13,7 +13,7 @@ Source3: pnp4nagios-README.fedora BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: rrdtool-perl -BuildRequires: perl-Time-HiRes +BuildRequires: perl(Time::HiRes) Requires: nagios Requires: rrdtool-perl Requires: php-gd @@ -21,9 +21,6 @@ Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires(postun): initscripts -%if 0%{?fedora} -Requires: php-Kohana -%endif %description PNP is an addon to nagios which analyzes performance data provided by plugins @@ -69,7 +66,6 @@ for i in $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample \ do mv ${i} ${i%%-sample} done -rm -f $RPM_BUILD_ROOT%{_datadir}/nagios/html/pnp4nagios/install.php rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php.* rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config_local.php @@ -86,8 +82,13 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/nagios/brokers mv $RPM_BUILD_ROOT%{_libdir}/npcdmod.o \ $RPM_BUILD_ROOT%{_libdir}/nagios/brokers/npcdmod.o mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}/ -# Remove install check script -# as it is not required if all dependencies are met. + +# Move kohana to pnp4nagios, there is another kohana in fedore/EPEL, +# which can be installed. +mv $RPM_BUILD_ROOT%{_libdir}/kohana \ + $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/kohana +sed -i 's|%{_libdir}/kohana|%{_datadir}/nagios/html/%{name}/kohana|' \ + $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/index.php %clean rm -rf $RPM_BUILD_ROOT @@ -127,11 +128,22 @@ fi %attr(755,nagios,nagios) %{_localstatedir}/log/%{name} %attr(755,nagios,nagios) %{_localstatedir}/spool/%{name} %{_datadir}/nagios/html/%{name} +# Remove install check script +# as it is not required if all dependencies are met. +%exclude %{_datadir}/nagios/html/%{name}/install.php %{_mandir}/man8/* -# no not package Kohana -%exclude %{_libdir}/kohana +# This is a different version of Kohana like in Fedora/EPEL. +# Needed for pnp4nagios web interface to work. +%{_datadir}/nagios/html/%{name}/kohana %changelog +* Mon Nov 21 2011 Ján ONDREJ (SAL) - 0.6.15-4 +- add back kohana, it's a different version +- added BR: perl(Time::HiRes) + +* Mon Nov 21 2011 Ján ONDREJ (SAL) - 0.6.15-2 +- exclude kohana sources and require php-Kohana package + * Wed Nov 16 2011 Ján ONDREJ (SAL) - 0.6.15-1 - update to upstream - remove /usr/share/nagios/html/pnp4nagios/install.php