icingaweb2.spec: Fixes for SLES 11
Refs #4075 Signed-off-by: Michael Friedrich <michael.friedrich@gmail.com>
This commit is contained in:
parent
cf6f1f8bf4
commit
b0b2d21751
|
@ -9,13 +9,21 @@
|
||||||
%define sharedir %{_datadir}/icingaweb
|
%define sharedir %{_datadir}/icingaweb
|
||||||
%define prefixdir %{_datadir}/icingaweb
|
%define prefixdir %{_datadir}/icingaweb
|
||||||
%define logdir %{sharedir}/log
|
%define logdir %{sharedir}/log
|
||||||
|
%define usermodparam -a -G
|
||||||
#%define logdir %{_localstatedir}/log/icingaweb
|
#%define logdir %{_localstatedir}/log/icingaweb
|
||||||
|
|
||||||
%if "%{_vendor}" == "suse"
|
%if "%{_vendor}" == "suse"
|
||||||
%define phpname php5
|
%define phpname php5
|
||||||
%define phpzendname php5-ZendFramework
|
%define phpzendname php5-ZendFramework
|
||||||
|
%define apache2modphpname apache2-mod_php5
|
||||||
%endif
|
%endif
|
||||||
%if "%{_vendor}" == "redhat"
|
# SLE 11 = 1110
|
||||||
|
%if 0%{?suse_version} == 1110
|
||||||
|
%define apache2modphpname apache2-mod_php53
|
||||||
|
%define usermodparam -A
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{_vendor}" == "redhat" || 0%{?suse_version} == 1110
|
||||||
%define phpname php
|
%define phpname php
|
||||||
%define phpzendname php-ZendFramework
|
%define phpzendname php-ZendFramework
|
||||||
%endif
|
%endif
|
||||||
|
@ -53,7 +61,7 @@ BuildArch: noarch
|
||||||
AutoReqProv: Off
|
AutoReqProv: Off
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Source0: icingaweb2-%{version}.tar.gz
|
Source0: icingaweb2-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
|
@ -62,9 +70,11 @@ BuildRequires: %{phpname}-devel >= 5.3.0
|
||||||
BuildRequires: %{phpname}-ldap
|
BuildRequires: %{phpname}-ldap
|
||||||
BuildRequires: %{phpname}-pdo
|
BuildRequires: %{phpname}-pdo
|
||||||
BuildRequires: %{phpzendname}
|
BuildRequires: %{phpzendname}
|
||||||
|
%if "%{_vendor}" != "suse"
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Pgsql
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Pgsql
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{_vendor}" == "redhat"
|
%if "%{_vendor}" == "redhat"
|
||||||
%endif
|
%endif
|
||||||
|
@ -76,11 +86,13 @@ BuildRequires: %{phpname}-dom
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: %{phpname} >= 5.3.0
|
Requires: %{phpname} >= 5.3.0
|
||||||
Requires: %{phpzendname}
|
Requires: %{phpzendname}
|
||||||
Requires: %{phpname}-ldap
|
Requires: %{phpname}-ldap
|
||||||
Requires: %{phpname}-pdo
|
Requires: %{phpname}-pdo
|
||||||
%if "%{_vendor}" == "redhat"
|
%if "%{_vendor}" == "redhat"
|
||||||
Requires: %{phpname}-common
|
Requires: %{phpname}-common
|
||||||
|
Requires: %{phpzendname}-Db-Adapter-Pdo
|
||||||
|
Requires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
||||||
Requires: php-pear
|
Requires: php-pear
|
||||||
%endif
|
%endif
|
||||||
%if "%{_vendor}" == "suse"
|
%if "%{_vendor}" == "suse"
|
||||||
|
@ -90,12 +102,9 @@ Requires: %{phpname}-tokenizer
|
||||||
Requires: %{phpname}-gettext
|
Requires: %{phpname}-gettext
|
||||||
Requires: %{phpname}-ctype
|
Requires: %{phpname}-ctype
|
||||||
Requires: %{phpname}-json
|
Requires: %{phpname}-json
|
||||||
Requires: apache2-mod_php5
|
Requires: %{apache2modphpname}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: %{phpzendname}-Db-Adapter-Pdo
|
|
||||||
Requires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
|
||||||
|
|
||||||
Requires: php-Icinga
|
Requires: php-Icinga
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +146,7 @@ IcingaWeb for RHEL and SUSE
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
Please check ./doc/installation.md
|
Please check ./doc/installation.md
|
||||||
for requirements and database setup.
|
for requirements and database setup.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -187,7 +196,7 @@ rm -f %{buildroot}/%{_datadir}/%{name}/public/.htaccess.in
|
||||||
getent group icingacmd > /dev/null
|
getent group icingacmd > /dev/null
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
%{_sbindir}/usermod -a -G icingacmd %{apacheuser}
|
%{_sbindir}/usermod %{usermodparam} icingacmd %{apacheuser}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# uncomment if building from git
|
# uncomment if building from git
|
||||||
|
|
Loading…
Reference in New Issue