Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
-Version: 5.6.23
+Version: 5.6.27
Release: %{rel}
Epoch: 4
# All files licensed under PHP version 3.01, except
License: PHP 3.01 and Zend and BSD
Group: Libraries
Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: c2d2155e50bcbaa0ee7a63845862c894
+# Source0-md5: 9ce6efc96d5ab81ef808f8ed6b1f242d
Source2: %{orgname}-mod_%{orgname}.conf
Source3: %{orgname}-cgi-fcgi.ini
Source4: %{orgname}-apache.ini
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Requires: alternatives
+Requires: php-dirs >= 1.4-2
Requires: rc-scripts
Provides: php(fcgi)
Provides: php(fpm)
%{__make} -f Makefile.phpdbg install-phpdbg \
INSTALL="libtool --mode=install install -p" \
INSTALL_ROOT=$RPM_BUILD_ROOT
+
+# version the phpdbg files
+mv $RPM_BUILD_ROOT%{_bindir}/phpdbg{,%{ver_suffix}}
+mv $RPM_BUILD_ROOT%{_mandir}/man1/phpdbg{,%{ver_suffix}}.1
%endif
%if %{with milter}
%{__sed} -i -e '/su/d' $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
%endif
+# touch for ghost for alternatives
+touch $RPM_BUILD_ROOT%{_sbindir}/php-fpm
+
%{__sed} -i -e '
s#/usr/lib/php#%{php_extensiondir}#
s#/etc/php#%{_sysconfdir}#
%post fpm
/sbin/chkconfig --add %{name}-fpm
%service %{name}-fpm restart
+update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{ver_suffix}-fpm %{ver_suffix} || :
%preun fpm
if [ "$1" = "0" ]; then
%service %{name}-fpm stop
/sbin/chkconfig --del %{name}-fpm
+ update-alternatives --remove php-fpm %{_sbindir}/php-fpm || :
fi
%postun fpm
%post embedded -p /sbin/ldconfig
%postun embedded -p /sbin/ldconfig
-%post common
+%posttrans common
# PHP 5.3 requires timezone being setup, try setup it from tzdata
if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/sysconfig/timezone ]; then
TIMEZONE=
fi
fi
-%posttrans common
# minimizing apache restarts logics. we restart webserver:
#
# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpm.d/www.conf
%attr(755,root,root) %{_sbindir}/%{name}-fpm
+%ghost %{_sbindir}/php-fpm
%{_mandir}/man8/%{name}-fpm.8*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-fpm
%attr(754,root,root) /etc/rc.d/init.d/%{name}-fpm
%if %{with phpdbg}
%files phpdbg
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/phpdbg
-%{_mandir}/man1/phpdbg.1*
+%attr(755,root,root) %{_bindir}/phpdbg%{ver_suffix}
+%{_mandir}/man1/phpdbg%{ver_suffix}.1*
%endif
%if %{with milter}
%dir %{_sysconfdir}
%dir %{_sysconfdir}/conf.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
+%if %{with apache1} || %{with apache2}
%attr(755,root,root) %{_libdir}/libphp_common-*.so
+%endif
%dir %{php_extensiondir}
%doc ext/session/mod_files.sh
%doc CODING_STANDARDS README.{EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,TESTING2,UNIX-BUILD-SYSTEM,input_filter}
%attr(755,root,root) %{_bindir}/phpize
%attr(755,root,root) %{_bindir}/php-config
+%if %{with apache1} || %{with apache2}
%attr(755,root,root) %{_libdir}/libphp_common.so
+%else
+%attr(755,root,root) %{_libdir}/libphp_common.a
+%endif
%{_libdir}/libphp_common.la
%{_includedir}/php
%{_libdir}/%{name}/build