[icinga-checkins] icinga.org: icinga-web/feature/sles-pkg-5094: Fix PHP package name on SLES.

git at icinga.org git at icinga.org
Mon Nov 18 13:43:33 CET 2013


Module: icinga-web
Branch: feature/sles-pkg-5094
Commit: 2d590324c430f62d995e88c05fda46e89443c811
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=2d590324c430f62d995e88c05fda46e89443c811

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Nov 18 12:06:35 2013 +0100

Fix PHP package name on SLES.

Refs #5094

---

 icinga-web.spec |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/icinga-web.spec b/icinga-web.spec
index 0c9b4a8..d76ca04 100644
--- a/icinga-web.spec
+++ b/icinga-web.spec
@@ -9,18 +9,19 @@
 %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
 
 # el5 requires newer php53 rather than php (5.1)
 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5"
 %define phpname php53
 %endif
 
+%define phpbuildname %{phpname}
+
+%if "%{_vendor}" == "suse"
+%define phpbuildname php5
+%endif
+
 %if "%{_vendor}" == "suse"
 %define apacheconfdir  %{_sysconfdir}/apache2/conf.d
 %define apacheuser wwwrun
@@ -51,23 +52,22 @@ Source0:        https://downloads.sourceforge.net/project/icinga/icinga-web/%{ve
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 
-BuildRequires:  %{phpname} >= 5.2.3
-BuildRequires:  %{phpname}-devel >= 5.2.3
-BuildRequires:  %{phpname}-gd
-BuildRequires:  %{phpname}-ldap
-BuildRequires:  %{phpname}-pdo
+BuildRequires:  %{phpbuildname} >= 5.2.3
+BuildRequires:  %{phpbuildname}-devel >= 5.2.3
+BuildRequires:  %{phpbuildname}-gd
+BuildRequires:  %{phpbuildname}-ldap
+BuildRequires:  %{phpbuildname}-pdo
 
 %if "%{_vendor}" == "redhat"
-BuildRequires:  %{phpname}-xml
+BuildRequires:  %{phpbuildname}-xml
 BuildRequires:  php-pear
 %endif
 %if "%{_vendor}" == "suse"
-Requires:       %{phpname}-devel >= 5.2.3
-BuildRequires:  %{phpname}-json
-BuildRequires:  %{phpname}-sockets
-BuildRequires:  %{phpname}-xsl
-BuildRequires:  %{phpname}-dom
-BuildRequires:  %{phpname}-pear
+BuildRequires:  %{phpbuildname}-json
+BuildRequires:  %{phpbuildname}-sockets
+BuildRequires:  %{phpbuildname}-xsl
+BuildRequires:  %{phpbuildname}-dom
+BuildRequires:  %{phpbuildname}-pear
 %endif
 
 Requires:       pcre >= 7.6
@@ -90,7 +90,7 @@ Requires:       %{phpname}-gettext
 Requires:       %{phpname}-ctype
 Requires:       %{phpname}-json
 Requires:       %{phpname}-pear
-Requires:       apache2-mod_php5
+Requires:       apache2-mod_%{phpname}
 %endif
 
 





More information about the icinga-checkins mailing list