summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php70.spec25
1 files changed, 19 insertions, 6 deletions
diff --git a/php70.spec b/php70.spec
index 4701c5f..46d4c28 100644
--- a/php70.spec
+++ b/php70.spec
@@ -134,7 +134,7 @@ Source7: php-fpm.logrotate
Source8: php-fpm.sysconfig
Source9: php.modconf
Source10: php.ztsmodconf
-Source12: php.conf2
+Source11: php.conf2
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# Configuration files for some extensions
@@ -1209,9 +1209,6 @@ if [ ! -f Zend/zend_language_parser.c ]; then
./genfiles
fi
-# For doc
-cat %{SOURCE1} %{SOURCE12} >httpd-php.conf
-
%build
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
@@ -1648,7 +1645,18 @@ 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
+%else
+mkdir _fpmdoc
+cat %{SOURCE1} %{SOURCE11} >_fpmdoc/httpd-php.conf
+cat << 'EOF' >_fpmdoc/README
+To use FPM with Apache HTTP server:
+- copy the httpd-php.conf to %{_httpd_confdir}
+
+Tu use FPM with NGINX web server:
+- copy the nginx-fpm.conf to %{_sysconfdir}/nginx/conf.d
+- copy the nginx-php.conf to %{_sysconfdir}/nginx/default.d
+EOF
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
@@ -1716,6 +1724,9 @@ sed -e 's@127.0.0.1:9000@unix:/run/php-fpm/www.sock@' \
# Apache
sed -e 's@proxy:fcgi://127.0.0.1:9000@proxy:unix:/run/php-fpm/www.sock|fcgi://localhost@' \
-i $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+%else
+install -D -m 644 %{SOURCE13} _fpmdoc/nginx-fpm.conf
+install -D -m 644 %{SOURCE14} _fpmdoc/nginx-php.conf
%endif
# Generate files lists and stub .ini files for each subpackage
@@ -1986,13 +1997,15 @@ fi
%doc sapi/phpdbg/{README.md,CREDITS}
%files fpm
-%doc php-fpm.conf.default www.conf.default httpd-php.conf
+%doc php-fpm.conf.default www.conf.default
%license fpm_LICENSE
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/wsdlcache
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/opcache
%if %{with_httpd2410}
%config(noreplace) %{_httpd_confdir}/php.conf
+%else
+%doc _fpmdoc/*
%endif
%config(noreplace) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf