Skip to content

Commit

Permalink
icinga-web.spec: bump to 1.8.2, add -nagios-bp, fix php53 requirement…
Browse files Browse the repository at this point in the history
… on el5

+* Thu Feb 15 2013 Michael Friedrich <michael.friedrich@netways.de> -
1.8.2-2
+- fix rpmlint errors/warnings
+
+* Wed Feb 11 2013 Markus Frosch <markus.frosch@netways.de> - 1.8.2-1
+- bump to 1.8.2
+
+* Wed Feb 06 2013 Michael Friedrich <michael.friedrich@netways.de> -
1.8.1-3
+- fix php5-pear reqs
+- fix php5-dom (suse), php-xml (rhel) and other missing/faulty reqs
+
+* Fri Jan 25 2013 Christian Dengler <christian.dengler@netways.de> -
1.8.1-2
+- add BuildRequires; add subpackage for nagiosbp
  • Loading branch information
dnsmichi committed Feb 14, 2013
1 parent d4e20b4 commit 4f007a7
Showing 1 changed file with 112 additions and 20 deletions.
132 changes: 112 additions & 20 deletions specs/icinga-web/icinga-web.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
# Upstream: The icinga devel team <icinga-devel at lists.sourceforge.net>
# ExcludeDist: el4 el3

%define revision 1
%define revision 2

%define logdir %{_localstatedir}/log/%{name}
%define cachedir %{_localstatedir}/cache/%{name}
%define reportingcachedir %{_localstatedir}/cache/%{name}/reporting

%if "%{_vendor}" == "suse"
%define phpname php5
%endif
%if "%{_vendor}" == "redhat"
%define phpname php
%endif

# 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
%define apacheuser wwwrun
Expand All @@ -30,7 +44,7 @@

Summary: Open Source host, service and network monitoring Web UI
Name: icinga-web
Version: 1.8.1
Version: 1.8.2
Release: %{revision}%{?dist}
License: GPLv3
Group: Applications/System
Expand All @@ -45,22 +59,46 @@ Source0: https://downloads.sourceforge.net/project/icinga/icinga-web/%{version}/

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: %{phpname} >= 5.2.3
BuildRequires: %{phpname}-gd
BuildRequires: %{phpname}-ldap
BuildRequires: %{phpname}-pdo

%if "%{_vendor}" == "redhat"
BuildRequires: %{phpname}-xml
BuildRequires: php-pear
%endif
%if "%{_vendor}" == "suse"
BuildRequires: %{phpname}-devel >= 5.2.3
BuildRequires: %{phpname}-json
BuildRequires: %{phpname}-sockets
BuildRequires: %{phpname}-xsl
BuildRequires: %{phpname}-dom
BuildRequires: %{phpname}-pear
%endif


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}-gd
Requires: %{phpname}-ldap
Requires: %{phpname}-pdo
%if "%{_vendor}" == "redhat"
Requires: php-common
Requires: %{phpname}-common
Requires: %{phpname}-xml
Requires: php-pear
%endif
%if "%{_vendor}" == "suse"
Requires: php-xsl
Requires: %{phpname}-pear
Requires: %{phpname}-xsl
Requires: %{phpname}-dom
Requires: %{phpname}-tokenizer
Requires: %{phpname}-gettext
Requires: %{phpname}-ctype
Requires: %{phpname}-json
Requires: %{phpname}-pear
Requires: apache2-mod_php5
%endif
Requires: php-spl
Requires: pcre >= 7.6


Expand All @@ -82,11 +120,24 @@ 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
##############################
%setup -n %{name}-%{version}
%setup -q -n %{name}-%{version}

##############################
%build
Expand Down Expand Up @@ -133,6 +184,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
##############################
Expand Down Expand Up @@ -170,6 +231,12 @@ fi
# clean cronk template cache
%{__rm} -rf %{cachedir}/CronkTemplates/*.php

##############################
%post module-nagiosbp
##############################

%{_bindir}/%{name}-clearcache

##############################
%clean
##############################
Expand All @@ -180,8 +247,11 @@ fi
%files
##############################
# main dirs
%doc etc/schema contrib doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
%defattr(-,root,root)
%doc etc/schema doc/README.RHEL doc/AUTHORS doc/CHANGELOG-1.7 doc/CHANGELOG-1.x doc/LICENSE
# 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
Expand All @@ -205,14 +275,36 @@ fi
%files module-pnp
##############################
# templates, experimental treatment as configs (noreplace)
%doc contrib/PNP_Integration/README
%defattr(-,root,root)
%doc contrib/PNP_Integration/README contrib/PNP_Integration/INSTALL
%doc contrib/PNP_Integration/doc contrib/nginx
%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)
%defattr(-,root,root)
%doc contrib/businessprocess-icinga-cronk/doc
%config(noreplace) %{_datadir}/%{name}/app/modules/BPAddon/config/*
%{_datadir}/%{name}/app/modules/BPAddon

##############################
%changelog
##############################
* Thu Feb 15 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.2-2
- fix rpmlint errors/warnings

* Wed Feb 11 2013 Markus Frosch <markus.frosch@netways.de> - 1.8.2-1
- bump to 1.8.2

* Wed Feb 06 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.1-3
- fix php5-pear reqs
- fix php5-dom (suse), php-xml (rhel) and other missing/faulty reqs

* Fri Jan 25 2013 Christian Dengler <christian.dengler@netways.de> - 1.8.1-2
- add BuildRequires; add subpackage for nagiosbp

* Wed Dec 5 2012 Marius Hein <marius.hein@netways.de> - 1.8.1-1
- bump to 1.8.1

Expand Down Expand Up @@ -248,23 +340,23 @@ fi

* Mon Feb 20 2012 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.2-1
- bump to 1.6.2
- clean config cache in %post (important for upgrades) #2217
- clean config cache in post (important for upgrades) #2217

* Mon Dec 12 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.1-1
- bump to 1.6.1
- fix forgotten sla.xml inclusion

* Sat Oct 22 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.6.0-1
- bump to 1.6.0
- add --with-cache-dir and use %{_localstatedir}/cache/icinga-web
- add --with-cache-dir and use _localstatedir/cache/icinga-web

* Thu Sep 15 2011 Michael Friedrich <michael.friedrich@univie.ac.at> - 1.5.2-1
- drop icinga-api dependency
- drop BuildRequires - not needed at this stage
- add --with-api-cmd-file, using same location as icinga rpm %{_localstatedir}/icinga/rw/icinga.cmd
- change new config location from default $prefix/etc/conf.d to %{_sysconfdir}/icinga-web
- add --with-api-cmd-file, using same location as icinga rpm _localstatedir/icinga/rw/icinga.cmd
- change new config location from default $prefix/etc/conf.d to _sysconfdir/icinga-web
- mark all config xmls as config noreplace
- set %{_localstatedir}/log/icinga-web and use it instead of $prefix/logs
- set _localstatedir/log/icinga-web and use it instead of $prefix/logs
- set apache user/group to write logdir
- reorder files to be included in the package

Expand Down

0 comments on commit 4f007a7

Please sign in to comment.