# - update imap myrights patch (needs api porting)
# --with-libmbfl=DIR MBSTRING: Use external libmbfl. DIR is the libmbfl base install directory BUNDLED
# --with-onig=DIR MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix.
-# NOTE: mysqlnd does not support ssl or compression (see FAQ at http://dev.mysql.com/downloads/connector/php-mysqlnd/)
# UNPACKAGED EXTENSION NOTES:
# - com_dotnet is Win32-only
# TODO:
# libxml
# Reflection
# standard
-#
+#
# Conditional build:
+%bcond_with default_php # use this PHP as default PHP in distro
%bcond_with interbase_inst # use InterBase install., not Firebird (BR: proprietary libs)
%bcond_with oci # with Oracle oci8 extension module (BR: proprietary libs)
-%bcond_without instantclient # build Oracle oci8 extension module against oracle-instantclient package
+%bcond_with instantclient # build Oracle oci8 extension module against oracle-instantclient package
%bcond_with system_gd # with system gd (imageantialias function is missing then)
%bcond_with system_libzip # with system libzip (reported broken currently)
-%bcond_with default_php # use this PHP as default PHP in distro
%bcond_without curl # without CURL extension module
%bcond_without enchant # without Enchant extension module
%bcond_without filter # without filter extension module
%bcond_without mhash # without mhash extension (supported by hash extension)
%bcond_without mm # without mm support for session storage
%bcond_without mssql # without MS SQL extension module
-# don't turn it on by default; see TODO item for mysqlnd in this spec
-%bcond_with mysqlnd # with mysqlnd support in mysql related extensions
+%bcond_without mysqlnd # without mysqlnd support in mysql related extensions
%bcond_without mysqli # without mysqli support (Requires mysql > 4.1)
%bcond_without odbc # without ODBC extension module
%bcond_without opcache # without Enable Zend OPcache extension support
%bcond_without webp # Without WebP support in GD extension (imagecreatefromwebp)
%bcond_without wddx # without WDDX extension module
%bcond_without xmlrpc # without XML-RPC extension module
-%bcond_without apache1 # disable building Apache 1.3.x SAPI
+%bcond_with apache1 # disable building Apache 1.3.x SAPI
%bcond_without apache2 # disable building Apache 2.x SAPI
%bcond_with zts # Zend Thread Safety
%bcond_without cgi # disable CGI/FCGI SAPI
Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
-Version: 5.6.0
+Version: 5.6.24
Release: %{rel}%{?with_type_hints:.th}
Epoch: 4
License: PHP
Group: Libraries
Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 642825d75ce2634d9513d5b21dbee521
+# Source0-md5: 3ef6e3573698b9b444be88edd3b23494
Source2: %{orgname}-mod_%{orgname}.conf
Source3: %{orgname}-cgi-fcgi.ini
Source4: %{orgname}-apache.ini
Source13: dep-tests.sh
Source14: skip-tests.sh
Patch0: %{orgname}-shared.patch
-Patch1: %{orgname}-pldlogo.patch
+Patch1: %{orgname}-tld.patch
Patch2: %{orgname}-mail.patch
Patch3: %{orgname}-link-libs.patch
Patch4: %{orgname}-libpq_fs_h_path.patch
Patch66: php-db.patch
Patch67: mysql-lib-ver-mismatch.patch
Patch69: fpm-conf-split.patch
+Patch70: mysqlnd-ssl.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
BuildRequires: libpng-devel >= 1.0.8
%{?with_webp:BuildRequires: libvpx-devel}
BuildRequires: tokyocabinet-devel
-%if "%{pld_release}" != "ac"
BuildRequires: libtool >= 2:2.2
-%else
-BuildRequires: libtool >= 1.4.3
-%endif
BuildRequires: libxml2-devel >= 1:2.7.6-4
BuildRequires: libxslt-devel >= 1.1.0
%{?with_mm:BuildRequires: mm-devel >= 1.3.0}
%define hashver 1.0
%define intlver 1.1.0
%define jsonver 1.2.1
-%define opcachever 7.0.4-dev
+%define opcachever 7.0.6-dev
%define pharver 2.0.2
%define sqlite3ver 0.7-dev
-%define zipver 1.12.4
+%define zipver 1.12.5
%define phpdbgver 0.4.0
%define _zend_zts %{!?with_zts:0}%{?with_zts:1}
Provides: webserver(php) = %{version}
Obsoletes: php-cgi < 4:5.3.28-7
Obsoletes: php-fcgi < 4:5.3.0
-%if "%{pld_release}" != "ac"
Conflicts: logrotate < 3.8.0
-%endif
%description cgi
PHP as CGI or FastCGI program.
Summary(pl.UTF-8): PHP jako interpreter działający z linii poleceń
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php-program
Obsoletes: php-cli < 4:5.3.28-7
%description cli
Ten pakiet zawiera bibliotekę, którą można osadzać w aplikacjach w
celu obsługi PHP jako języka skryptowego.
-%package program
-Summary: /usr/bin/php symlink
-Summary(pl.UTF-8): Dowiązanie symboliczne /usr/bin/php
-Group: Development/Languages/PHP
-Requires: %{name}-cli = %{epoch}:%{version}-%{release}
-Obsoletes: /usr/bin/php
-Obsoletes: php-program < 4:5.3.28-7
-
-%description program
-Package providing /usr/bin/php symlink to PHP CLI.
-
-%description program -l pl.UTF-8
-Pakiet dostarczający dowiązanie symboliczne /usr/bin/php do PHP CLI.
-
%package fpm
Summary: PHP FastCGI Process Manager
Summary(pl.UTF-8): PHP FastCGI Process Manager - zarządca procesów FastCGI
Provides: php(libxml)
Provides: php(reflection)
Provides: php(standard)
-%{!?with_mysqlnd:Obsoletes: php-mysqlnd}
+%{!?with_mysqlnd:Obsoletes: %{name}-mysqlnd}
%{?with_pcre:%requires_ge_to pcre pcre-devel}
Obsoletes: php-common < 4:5.3.28-7
Obsoletes: php-pecl-domxml
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: autoconf >= 2.13
Requires: automake
-%if "%{pld_release}" != "ac"
Requires: libtool >= 2:2.2
-%else
-Requires: libtool
-%endif
%{?with_pcre:Requires: pcre-devel >= 8.10}
Requires: shtool
Provides: php-devel = %{epoch}:%{version}-%{release}
-Obsoletes: php-devel
Obsoletes: php-pear-devel
Obsoletes: php4-devel
Obsoletes: php52-devel
Obsoletes: php53-devel
Obsoletes: php54-devel
+Obsoletes: php55-devel
%description devel
The php-devel package lets you compile dynamic extensions to PHP.
%patch27 -p1
%patch29 -p1
%patch31 -p1
-%if "%{pld_release}" != "ac"
%patch34 -p1
-%endif
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%if %{with fpm}
+%patch69 -p1
%patch41 -p1
%patch42 -p1
%endif
%{?with_system_libzip:%patch65 -p1}
%patch66 -p1
%patch67 -p1
-%patch69 -p1
+%patch70 -p1
sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
cp -af php_config.h.cli main/php_config.h
cp -af Makefile.cli Makefile
%{__make} libphp_common.la
-%{__make} build-modules
+# hack: MYSQLND_SHARED_LIBADD not initialized
+%{__make} build-modules \
+ MYSQLND_SHARED_LIBADD="-lssl -lcrypto"
%if %{with apache1}
%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1
install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm
install -d $RPM_BUILD_ROOT/etc/logrotate.d
cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
-%if "%{pld_release}" == "ac"
-%{__sed} -i -e '/su/d' $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
-%endif
%{__sed} -i -e '
s#/usr/lib/php#%{php_extensiondir}#
# versioned suffix is always installed
libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{ver_suffix}
cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{ver_suffix}.1
+
+%if %{with default_php}
+# man for php
echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
+# link as /usr/bin/php
ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
+# php.cli link for backward compatibility
+ln -sf php $RPM_BUILD_ROOT%{_bindir}/php.cli
+%endif
cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d}
# use system automake and {lib,sh}tool
-%if "%{pld_release}" != "ac"
ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build
for i in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do
ln -snf %{_aclocaldir}/${i} $RPM_BUILD_ROOT%{_libdir}/%{name}/build
done
ln -snf %{_datadir}/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-%else
- ln -snf %{_aclocaldir}/libtool.m4 $RPM_BUILD_ROOT%{_libdir}/%{name}/build
- ln -snf %{_datadir}/libtool/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-%endif
ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/%{name}/build
sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini
%attr(755,root,root) %{_bindir}/php%{ver_suffix}
%{_mandir}/man1/php%{ver_suffix}.1*
-
-%files program
-%defattr(644,root,root,755)
+%if %{with default_php}
%attr(755,root,root) %{_bindir}/php
+%attr(755,root,root) %{_bindir}/php.cli
%{_mandir}/man1/php.1*
+%endif
%if %{with fpm}
%files fpm