Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
build fix: destinguish between SLES12 and Leap 42.1
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Sep 23, 2016
1 parent 19f03dc commit 48ad9b2
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions packaging/obs/bareos-webui.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Name: bareos-webui
#Provides:
Version: 15.2.1
Version: 16.2.0
Release: 0%{?dist}
Summary: Bareos Web User Interface

Expand All @@ -15,7 +15,11 @@ BuildArch: noarch

BuildRequires: autoconf automake bareos-common

Requires: php >= 5.3.3
# ZendFramework 2.4 says it required php >= 5.3.23.
# However, it works on SLES 11 with php 5.3.17
# while it does not work with php 5.3.3 (RHEL6).
Requires: php >= 5.3.17

Requires: php-bz2
Requires: php-ctype
Requires: php-curl
Expand Down Expand Up @@ -60,8 +64,6 @@ BuildRequires: mod_php_any
%define daemon_group www
Requires: apache
Requires: mod_php_any
#Recommends: php-pgsql php-mysql php-sqlite
#Suggests: postgresql-server mysql sqlite3
%else
#if 0#{?fedora} || 0#{?rhel_version} || 0#{?centos_version}
BuildRequires: httpd
Expand Down Expand Up @@ -140,8 +142,15 @@ fi; \
a2enmod setenv &> /dev/null || true
a2enmod rewrite &> /dev/null || true

%if 0%{?suse_version} >= 1215
a2enmod php7 &> /dev/null || true
%if 0%{?suse_version} >= 1315
# 1315:
# SLES12 (PHP 7)
# openSUSE Leap 42.1 (PHP 5)
if php -v | grep -q "PHP 7"; then
a2enmod php7 &> /dev/null || true
else
a2enmod php5 &> /dev/null || true
fi
%else
a2enmod php5 &> /dev/null || true
%endif
Expand Down

0 comments on commit 48ad9b2

Please sign in to comment.