From 5892b5324950f8c2b730f243da0ee09586e8d163 Mon Sep 17 00:00:00 2001
From: Markus Frosch <markus.frosch@icinga.com>
Date: Mon, 6 May 2019 13:29:34 +0200
Subject: [PATCH] Add PHP dependencies

---
 icingaweb2-module-reactbundle.spec | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/icingaweb2-module-reactbundle.spec b/icingaweb2-module-reactbundle.spec
index 7898504..e717378 100644
--- a/icingaweb2-module-reactbundle.spec
+++ b/icingaweb2-module-reactbundle.spec
@@ -18,9 +18,37 @@ BuildArch:      noarch
 
 %global basedir %{_datadir}/icingaweb2/modules/%{module_name}
 
+%if 0%{?fedora} || 0%{?rhel} || 0%{?amzn}
+%if 0%{?rhel} == 7
+%define php_scl         rh-php71
+%endif # rhel 7
+%if 0%{?rhel} == 6
+%define php_scl         rh-php70
+%endif # rhel 6
+%endif # rhel os_family
+
+%if 0%{?php_scl:1}
+%define php_scl_prefix  %{php_scl}-
+%endif
+
+%define php             %{?php_scl_prefix}php
+
 Requires:       icingaweb2 >= %{icingaweb_min_version}
+Requires:       icingacli >= %{icingaweb_min_version}
 Requires:       php-Icinga >= %{icingaweb_min_version}
-# TODO: other dependencies
+
+%if 0%{?suse_version}
+Requires:       %{php}-pcntl
+Requires:       %{php}-posix
+Requires:       %{php}-soap
+Requires:       %{php}-sockets
+%else # suse_version
+# RedHat
+Requires:       %{php}-cli
+Requires:       %{php}-process
+Requires:       %{php}-pcntl
+Requires:       %{php}-soap
+%endif # suse_version
 
 %description
 This module provides React as a third-party library for other Icinga Web
-- 
GitLab