summaryrefslogtreecommitdiffstats
path: root/php72.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php72.spec')
-rw-r--r--php72.spec26
1 files changed, 20 insertions, 6 deletions
diff --git a/php72.spec b/php72.spec
index 673aee8..b3e75cb 100644
--- a/php72.spec
+++ b/php72.spec
@@ -1,4 +1,3 @@
-# remirepo spec file for php 7.2
# with backport stuff, adapted from
#
# Fedora spec file for php
@@ -118,7 +117,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 2%{?dist}
+Release: 3%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -139,7 +138,8 @@ Source7: php-fpm.logrotate
Source8: php-fpm.sysconfig
Source9: php.modconf
Source10: php.ztsmodconf
-Source12: php.conf2
+Source11: php.conf2
+Source12: php-fpm.wants
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# Configuration files for some extensions
@@ -235,6 +235,10 @@ Requires(pre): httpd
%endif
# php engine for Apache httpd webserver
Provides: php(httpd)
+%if 0%{?fedora} >= 27
+# httpd have threaded MPM by default
+Requires: php-fpm%{?_isa} = %{version}-%{release}
+%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Don't provides extensions, which are not shared library, as .so
@@ -1663,7 +1667,7 @@ cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%endif
%if %{with_httpd2410}
-cat %{SOURCE12} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+cat %{SOURCE11} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
@@ -1713,8 +1717,11 @@ sed -e 's/^pid/;pid/' \
-i $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
# this folder requires systemd >= 204
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d
-install -m 755 -d $RPM_BUILD_ROOT%{_unitdir}
-install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/
+install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service
+%if 0%{?fedora} >= 27
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf
+%endif
%else
sed -ne '1,2p' -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm
@@ -2029,6 +2036,10 @@ fi
%if %{with_systemd}
%{_prefix}/lib/tmpfiles.d/php-fpm.conf
%{_unitdir}/php-fpm.service
+%if 0%{?fedora} >= 27
+%{_unitdir}/httpd.service.d/%{?scl_prefix}php-fpm.conf
+%{_unitdir}/nginx.service.d/%{?scl_prefix}php-fpm.conf
+%endif
%dir %{_sysconfdir}/systemd/system/php-fpm.service.d
%dir /run/php-fpm
%else
@@ -2111,6 +2122,9 @@ fi
%changelog
+* Mon Sep 25 2017 Remi Collet <remi@remirepo.net> - 7.2.0~RC2-3
+- F27: php now requires php-fpm and start it with httpd / nginx
+
* Thu Sep 14 2017 Remi Collet <remi@remirepo.net> - 7.2.0~RC2-2
- update builder from RHEL 7.3 to RHEL 7.4