[icinga-checkins] icinga.org: icinga-web/master: add BuildRequires; add subpackage for nagiosbp

git at icinga.org git at icinga.org
Thu Apr 4 11:52:50 CEST 2013


Module: icinga-web
Branch: master
Commit: 68d99b9a52e79906ba8270e1066749e4c787cf4c
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=68d99b9a52e79906ba8270e1066749e4c787cf4c

Author: Christian Dengler <christian.dengler at netways.de>
Date:   Fri Jan 25 19:16:35 2013 +0100

add BuildRequires; add subpackage for nagiosbp

Signed-off-by: Michael Friedrich <michael.friedrich at netways.de>

icinga-web.spec: change distbased depends on php53=el5, php=rest, add missing buildreqs (thx Stefan Marx) fixes #2610 #3524

icinga-web.spec: fix buildrequires from previous patch merge

refs #3524

---

 icinga-web.spec |   84 +++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 72 insertions(+), 12 deletions(-)

diff --git a/icinga-web.spec b/icinga-web.spec
index a2d21ec..e3c870e 100644
--- a/icinga-web.spec
+++ b/icinga-web.spec
@@ -8,6 +8,14 @@
 %define logdir %{_localstatedir}/log/%{name}
 %define cachedir %{_localstatedir}/cache/%{name}
 %define reportingcachedir %{_localstatedir}/cache/%{name}/reporting
+%define phpname php
+
+# on RHEL5 php is php-5.1 and php53 is php-5.3
+# icinga-web requires at least php-5.2.3 so
+# enforce the correct php package name on RHEL5
+%if 0%{?el5}
+%define phpname php53
+%endif
 
 %if "%{_vendor}" == "suse"
 %define apacheconfdir  %{_sysconfdir}/apache2/conf.d
@@ -45,22 +53,30 @@ Source0: https://downloads.sourceforge.net/project/icinga/icinga-web/%{version}/
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
+BuildRequires: %{phpname} >= 5.2.3
+BuildRequires: %{phpname}-pear
+BuildRequires: %{phpname}-gd
+BuildRequires: %{phpname}-xml
+BuildRequires: %{phpname}-ldap
+BuildRequires: %{phpname}-pdo
+BuildRequires: %{phpname}-dom
+
 Requires: perl(Locale::PO)
-Requires: php >= 5.2.3
-Requires: php-pear
-Requires: php-gd
-Requires: php-xml
-Requires: php-ldap
-Requires: php-pdo
-Requires: php-dom
+Requires: %{phpname} >= 5.2.3
+Requires: %{phpname}-pear
+Requires: %{phpname}-gd
+Requires: %{phpname}-xml
+Requires: %{phpname}-ldap
+Requires: %{phpname}-pdo
+Requires: %{phpname}-dom
 %if "%{_vendor}" == "redhat"
-Requires: php-common
+Requires: %{phpname}-common
 %endif
 %if "%{_vendor}" == "suse"
-Requires: php-xsl
+Requires: %{phpname}-xsl
 Requires: apache2-mod_php5
 %endif
-Requires: php-spl
+Requires: %{phpname}-spl
 Requires: pcre >= 7.6
 
 
@@ -82,6 +98,19 @@ Requires: %{name} = %{version}-%{release}
 ##############################
 PNP Integration module for Icinga Web
 
+##############################
+%package module-nagiosbp
+##############################
+Summary: Nagios Business Process Addon Integration module for Icinga Web
+Group: Applications/System
+Requires: nagios-business-process-addon-icinga
+Requires: %{name} = %{version}-%{release}
+
+##############################
+%description module-nagiosbp
+##############################
+Summary: Nagios Business Process Addon Integration module for Icinga Web
+
 
 ##############################
 %prep
@@ -133,6 +162,16 @@ PNP Integration module for Icinga Web
 # place the pnp templates for -module-pnp
 %{__cp} contrib/PNP_Integration/templateExtensions/* %{buildroot}%{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions/
 
+# place the nagiosbp files for -module-nagiosbp
+%{__mkdir} %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon
+%{__cp} -r contrib/businessprocess-icinga-cronk/BPAddon/* %{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/
+# adjust the config for the packaged nagiosbp
+%{__sed} -i -e 's|/usr/local/nagiosbp/etc|/etc/nagiosbp|' \
+	-i -e 's|/usr/local/nagiosbp/bin|/usr/bin|' \
+	%{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/config/bp.xml
+%{__sed} -i -e 's|\(name="pass">\)icingaadmin|\1password|' \
+	%{buildroot}%{_datadir}/%{name}/app/modules/BPAddon/config/cronks.xml
+
 ##############################
 %pre
 ##############################
@@ -171,6 +210,12 @@ fi
 %{__rm} -rf %{cachedir}/CronkTemplates/*.php
 
 ##############################
+%post module-nagiosbp
+##############################
+
+%{_bindir}/%{name}-clearcache
+
+##############################
 %clean
 ##############################
 
@@ -180,8 +225,11 @@ fi
 %files
 ##############################
 # main dirs
-%doc etc/schema contrib doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
+%doc etc/schema doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
 %defattr(-,root,root)
+# packaged by subpackages
+%exclude %{_datadir}/%{name}/app/modules/BPAddon
+%exclude %{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions
 %{_datadir}/%{name}/app
 %{_datadir}/%{name}/doc
 %{_datadir}/%{name}/etc
@@ -205,14 +253,26 @@ fi
 %files module-pnp
 ##############################
 # templates, experimental treatment as configs (noreplace)
-%doc contrib/PNP_Integration/README
+%doc contrib/PNP_Integration/README contrib/PNP_Integration/INSTALL
+%doc contrib/PNP_Integration/doc contrib/nginx
 %defattr(-,root,root)
 %dir %{_datadir}/icinga-web/app/modules/Cronks/data/xml/extensions
 %config(noreplace) %attr(644,-,-) %{_datadir}/%{name}/app/modules/Cronks/data/xml/extensions/*
 
+%files module-nagiosbp
+##############################
+# templates, experimental treatment as configs (noreplace)
+%doc contrib/businessprocess-icinga-cronk/doc
+%defattr(-,root,root)
+%config(noreplace) %{_datadir}/%{name}/app/modules/BPAddon/config/*
+%{_datadir}/%{name}/app/modules/BPAddon
+
 ##############################
 %changelog
 ##############################
+* Fri Jan 25 2013 Christian Dengler <christian.dengler at netways.de> - 1.8.1-2
+- add BuildRequires; add subpackage for nagiosbp
+
 * Wed Dec 5 2012 Marius Hein <marius.hein at netways.de> - 1.8.1-1
 - bump to 1.8.1
 





More information about the icinga-checkins mailing list