2014-12-29 16:48:18 +01:00
|
|
|
Name: icingaweb2
|
|
|
|
Version: 2.0.0
|
|
|
|
Release: 1.beta2%{?dist}
|
|
|
|
Summary: Icinga Web 2
|
|
|
|
Group: Applications/System
|
|
|
|
License: GPL
|
|
|
|
URL: https://icinga.org
|
|
|
|
Source0: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
|
|
|
Packager: Icinga Team <info@icinga.org>
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
%define wwwconfigdir %{_sysconfdir}/httpd/conf.d
|
|
|
|
%define wwwuser apache
|
|
|
|
%if 0%{?rhel} == 5
|
|
|
|
%define php php53
|
|
|
|
%define php_cli php53-cli
|
|
|
|
%else
|
|
|
|
%define php php
|
|
|
|
%define php_cli php-cli
|
2013-10-20 16:00:12 +02:00
|
|
|
%endif
|
2014-12-29 16:48:18 +01:00
|
|
|
%if 0%{rhel} == 6
|
|
|
|
%define zend php-ZendFramework
|
|
|
|
%else
|
|
|
|
%define zend %{name}-vendor-Zend
|
2014-05-28 21:00:37 +02:00
|
|
|
%endif
|
2013-10-20 16:00:12 +02:00
|
|
|
%endif
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires: %{name}-common = %{version}-%{release}
|
|
|
|
Requires: php-Icinga = %{version}-%{release}
|
|
|
|
Requires: %{name}-vendor-dompdf
|
|
|
|
Requires: %{name}-vendor-HTMLPurifier
|
|
|
|
Requires: %{name}-vendor-JShrink
|
|
|
|
Requires: %{name}-vendor-lessphp
|
|
|
|
Requires: %{name}-vendor-Parsedown
|
|
|
|
Requires: %{zend}
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description
|
|
|
|
Icinga Web 2
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%define basedir %{_datadir}/%{name}
|
|
|
|
%define bindir %{_bindir}
|
|
|
|
%define configdir %{_sysconfdir}/%{name}
|
|
|
|
%define logdir %{_localstatedir}/log/%{name}
|
|
|
|
%define phpdir %{_datadir}/php
|
|
|
|
%define icingawebgroup icingaweb2
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package common
|
|
|
|
Summary: Common files for Icinga Web 2 and the Icinga CLI
|
|
|
|
Group: Applications/System
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description common
|
|
|
|
Common files for Icinga Web 2 and the Icinga CLI
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package -n php-Icinga
|
|
|
|
Summary: Icinga Web 2 PHP library
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description -n php-Icinga
|
|
|
|
Icinga Web 2 PHP library
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-05-13 00:27:06 +02:00
|
|
|
%package -n icingacli
|
2014-12-30 14:44:17 +01:00
|
|
|
Summary: Icinga CLI
|
|
|
|
Group: Applications/System
|
|
|
|
Requires: %{name}-common = %{version}-%{release}
|
|
|
|
Requires: php-Icinga = %{version}-%{release}
|
|
|
|
Requires: %{php_cli} >= 5.3.0
|
|
|
|
%{?rhel:Requires: bash-completion}
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-05-13 00:27:06 +02:00
|
|
|
%description -n icingacli
|
2014-12-29 16:48:18 +01:00
|
|
|
Icinga CLI
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-dompdf
|
|
|
|
Version: 0.6.1
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library dompdf
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description vendor-dompdf
|
|
|
|
Icinga Web 2 vendor library dompdf
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-HTMLPurifier
|
|
|
|
Version: 4.6.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library HTMLPurifier
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description vendor-HTMLPurifier
|
|
|
|
Icinga Web 2 vendor library HTMLPurifier
|
2013-10-20 18:44:07 +02:00
|
|
|
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-JShrink
|
|
|
|
Version: 1.0.1
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library JShrink
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description vendor-JShrink
|
|
|
|
Icinga Web 2 vendor library JShrink
|
2014-05-13 00:27:06 +02:00
|
|
|
|
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-lessphp
|
|
|
|
Version: 0.4.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library lessphp
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2014-05-13 00:27:06 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description vendor-lessphp
|
|
|
|
Icinga Web 2 vendor library lessphp
|
2014-05-13 00:27:06 +02:00
|
|
|
|
2013-10-20 18:44:07 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-Parsedown
|
|
|
|
Version: 1.0.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library Parsedown
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
|
|
|
|
|
|
|
%description vendor-Parsedown
|
|
|
|
Icinga Web 2 vendor library Parsedown
|
|
|
|
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%package vendor-Zend
|
|
|
|
Version: 1.12.9
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Icinga Web 2 vendor library Zend Framework
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{php} >= 5.3.0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
%description vendor-Zend
|
|
|
|
Icinga Web 2 vendor library Zend
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2014-12-30 14:51:18 +01:00
|
|
|
mkdir -p %{buildroot}/{%{basedir}/{modules,library,public},%{bindir},%{configdir},%{logdir},%{phpdir},%{wwwconfigdir},%{_sysconfdir}/bash_completion.d}
|
2014-12-30 14:48:02 +01:00
|
|
|
cp -prv application doc %{buildroot}/%{basedir}
|
2014-12-30 14:51:18 +01:00
|
|
|
cp -pv etc/bash_completion.d/icingacli %{buildroot}/%{_sysconfdir}/bash_completion.d/icingacli
|
2014-12-29 16:48:18 +01:00
|
|
|
cp -prv modules/{monitoring,setup} %{buildroot}/%{basedir}/modules
|
|
|
|
cp -prv library/Icinga %{buildroot}/%{phpdir}
|
|
|
|
cp -prv library/vendor %{buildroot}/%{basedir}/library
|
|
|
|
cp -prv public/{css,img,js,error_norewrite.html} %{buildroot}/%{basedir}/public
|
|
|
|
cp -pv packages/files/apache/icingaweb2.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf
|
|
|
|
cp -pv packages/files/bin/icingacli %{buildroot}/%{bindir}
|
|
|
|
cp -pv packages/files/public/index.php %{buildroot}/%{basedir}/public
|
|
|
|
|
|
|
|
%pre
|
|
|
|
getent group icingacmd >/dev/null || groupadd -r icingacmd
|
|
|
|
usermod -a -G icingacmd,%{icingawebgroup} %{wwwuser}
|
|
|
|
exit 0
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
%clean
|
2014-12-29 16:48:18 +01:00
|
|
|
rm -rf %{buildroot}
|
2013-10-20 16:00:12 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-12-29 16:48:18 +01:00
|
|
|
%{basedir}/application/controllers
|
|
|
|
%{basedir}/application/fonts
|
|
|
|
%{basedir}/application/forms
|
|
|
|
%{basedir}/application/layouts
|
|
|
|
%{basedir}/application/views
|
|
|
|
%{basedir}/doc
|
|
|
|
%{basedir}/modules
|
|
|
|
%{basedir}/public
|
|
|
|
%{wwwconfigdir}/icingaweb2.conf
|
|
|
|
%attr(2775,root,%{icingawebgroup}) %dir %{logdir}
|
|
|
|
|
|
|
|
|
|
|
|
%pre common
|
|
|
|
getent group %{icingawebgroup} >/dev/null || groupadd -r %{icingawebgroup}
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%files common
|
2013-10-20 16:00:12 +02:00
|
|
|
%defattr(-,root,root)
|
2014-12-29 16:48:18 +01:00
|
|
|
%{basedir}/application/locale
|
|
|
|
%dir %{basedir}/modules
|
|
|
|
%attr(2770,root,%{icingawebgroup}) %config(noreplace) %{configdir}
|
|
|
|
|
2013-10-20 16:00:12 +02:00
|
|
|
|
2014-05-13 00:27:06 +02:00
|
|
|
%files -n php-Icinga
|
2014-12-29 16:48:18 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{phpdir}/Icinga
|
|
|
|
|
2014-05-13 00:27:06 +02:00
|
|
|
|
|
|
|
%files -n icingacli
|
2014-12-29 16:48:18 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/application/clicommands
|
2014-12-30 14:48:47 +01:00
|
|
|
%{_sysconfdir}/bash_completion.d/icingacli
|
2014-12-29 16:48:18 +01:00
|
|
|
%attr(0755,root,root) %{bindir}/icingacli
|
|
|
|
|
|
|
|
|
|
|
|
%files vendor-dompdf
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/dompdf
|
2014-05-13 00:27:06 +02:00
|
|
|
|
2014-12-29 16:48:18 +01:00
|
|
|
|
|
|
|
%files vendor-HTMLPurifier
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/HTMLPurifier
|
|
|
|
|
|
|
|
|
|
|
|
%files vendor-JShrink
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/JShrink
|
|
|
|
|
|
|
|
|
|
|
|
%files vendor-lessphp
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/lessphp
|
|
|
|
|
|
|
|
|
|
|
|
%files vendor-Parsedown
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/Parsedown
|
|
|
|
|
|
|
|
|
|
|
|
%files vendor-Zend
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{basedir}/library/vendor/Zend
|