RPM: Support Amazon Linux

This commit is contained in:
Eric Lippmann 2015-07-02 09:26:59 +02:00
parent ea5e449076
commit 9e92a36ae5
1 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,7 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Packager: Icinga Team <info@icinga.org>
%if 0%{?fedora} || 0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} || 0%{?amzn}
%define wwwconfigdir %{_sysconfdir}/httpd/conf.d
%define wwwuser apache
%if 0%{?rhel} == 5
@ -44,6 +44,7 @@ Requires: apache2-mod_php5
%endif
%endif
%{?amzn:Requires(pre): shadow-utils}
%{?fedora:Requires(pre): shadow-utils}
%{?rhel:Requires(pre): shadow-utils}
%{?suse_version:Requires(pre): pwdutils}
@ -73,6 +74,7 @@ Icinga Web 2
%package common
Summary: Common files for Icinga Web 2 and the Icinga CLI
Group: Applications/System
%{?amzn:Requires(pre): shadow-utils}
%{?fedora:Requires(pre): shadow-utils}
%{?rhel:Requires(pre): shadow-utils}
%{?suse_version:Requires(pre): pwdutils}
@ -86,6 +88,7 @@ Summary: Icinga Web 2 PHP library
Group: Development/Libraries
Requires: %{php} >= 5.3.0
Requires: %{php}-gd %{php}-intl
%{?amzn:Requires: %{php}-pecl-imagick}
%{?fedora:Requires: php-pecl-imagick}
%{?rhel:Requires: php-pecl-imagick}
%{?suse_version:Requires: %{php}-gettext %{php}-json %{php}-openssl %{php}-posix}
@ -99,6 +102,7 @@ Summary: Icinga CLI
Group: Applications/System
Requires: %{name}-common = %{version}-%{release}
Requires: php-Icinga = %{version}-%{release}
%{?amzn:Requires: %{php_cli} >= 5.3.0 bash-completion}
%{?fedora:Requires: %{php_cli} >= 5.3.0 bash-completion}
%{?rhel:Requires: %{php_cli} >= 5.3.0 bash-completion}
%{?suse_version:Requires: %{php} >= 5.3.0}
@ -224,10 +228,10 @@ rm -rf %{buildroot}
%{basedir}/public
%{wwwconfigdir}/icingaweb2.conf
%attr(2775,root,%{icingawebgroup}) %dir %{logdir}
%{docsdir}
%docdir %{docsdir}
%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules/setup
%attr(0660,root,%{icingawebgroup}) %config(noreplace) %{configdir}/modules/setup/config.ini
%{docsdir}
%docdir %{docsdir}
%pre common