]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
fix mysqlnd bcond
[packages/php.git] / php.spec
index 99a745586fcaeb63cc6595b2d1bb8b974b3efe7d..5240bb7f86935ae6be007e3e33eba33172855600 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -1,4 +1,3 @@
-# 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:
 #
 # Conditional build:
 %bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
-%bcond_with    oci8            # with Oracle oci8 extension module     (BR: proprietary libs)
-%bcond_with    instantclient   # build Oracle oci8 extension module against oracle-instantclient package
+%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    system_gd       # with system gd (we prefer internal since it enables few more features)
 %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 filter          # without filter extension module
 %bcond_without enchant         # without Enchant extension module
@@ -41,9 +41,8 @@
 %bcond_without litespeed       # build litespeed module
 %bcond_without ldap            # without LDAP extension module
 %bcond_without mhash           # without mhash extension (supported by hash extension)
-%bcond_without mm              # without mm support for session storage
+%bcond_with    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 mysqli          # without mysqli support (Requires mysql > 4.1)
 %bcond_without odbc            # without ODBC extension module
 %undefine      with_mm
 %endif
 
-%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha
+%ifnarch %{ix86} %{x8664} x32 sparc sparcv9 alpha
 # ppc disabled (broken on th-ppc)
 %undefine      with_interbase
 %endif
 
-%ifnarch %{ix86} %{x8664}
+%ifnarch %{ix86} %{x8664} x32
 # unsupported, see sapi/cgi/fpm/fpm_atomic.h
 %undefine      with_fpm
 %endif
@@ -110,14 +109,18 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine      with_filter
 %endif
 
-%define                orgname php
-%if "%{pld_release}" == "ac_"
-%define                php_suffix 53
-%else
-%define                php_suffix %{nil}
+%if "%{pld_release}" == "ac"
+%define                _noautoreqdep libphp_common.*
+# if commandline --with was given. respect that
+%if 0%{!?_with_default_php:1}
+%undefine      with_default_php
+%endif
 %endif
 
-%define                rel     1
+%define                rel     16
+%define                orgname php
+%define                ver_suffix 53
+%define                php_suffix %{!?with_default_php:%{ver_suffix}}
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):     Język skryptowy PHP
@@ -125,19 +128,20 @@ Summary(pt_BR.UTF-8):     A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       5.3.20
+Version:       5.3.29
 Release:       %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci}
 Epoch:         4
-License:       PHP
+# All files licensed under PHP version 3.01, except
+# Zend is licensed under Zend
+# TSRM is licensed under BSD
+License:       PHP 3.01 and Zend and BSD
 Group:         Libraries
 Source0:       http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2
-# Source0-md5: 00241b9e89e93adf3baac32c56211e4e
+# Source0-md5: 9469e240cbe6ac865aeaec89b253dd30
 Source2:       %{orgname}-mod_%{orgname}.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
 Source5:       %{orgname}-cli.ini
-# Taken from: http://browsers.garykeith.com/downloads.asp
-Source9:       %{orgname}_browscap.ini
 Source10:      %{orgname}-fpm.init
 Source11:      %{orgname}-fpm.logrotate
 Source12:      %{orgname}-branch.sh
@@ -160,6 +164,7 @@ Patch11:    embed.patch
 %if %{with type_hints}
 Patch12:       http://ilia.ws/patch/type_hint_53_v2.txt
 %endif
+Patch13:       bug-test-pcntl-55479.patch
 Patch14:       %{orgname}-no_pear_install.patch
 Patch15:       %{orgname}-zlib.patch
 Patch17:       %{orgname}-readline.patch
@@ -188,6 +193,7 @@ Patch44:    %{orgname}-include_path.patch
 Patch45:       %{orgname}-imap-annotations.patch
 Patch46:       %{orgname}-imap-myrights.patch
 Patch47:       suhosin.patch
+Patch48:       php-bug-60598.patch
 Patch49:       %{orgname}-m4-divert.patch
 Patch50:       extension-shared-optional-dep.patch
 Patch51:       spl-shared.patch
@@ -202,6 +208,33 @@ Patch64:   %{orgname}-m4.patch
 Patch65:       system-libzip.patch
 Patch66:       %{orgname}-db.patch
 Patch67:       php-litespeed.patch
+Patch68:       x32.patch
+Patch69:       fpm-conf-split.patch
+Patch70:       mysql-lib-ver-mismatch.patch
+# git clone git://github.com/php/php-src.git && git checkout PHP_5_6
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/libmagic > ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/config.m4 >> ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/Makefile.frag >> ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/data_file.c >> ~/rpm/packages/php/php-fileinfo.patch
+Patch71:       php-fileinfo.patch
+# Patch71-md5: 771e4934132c5f5c968248c954d1ef6e
+# Fixes for security bugs
+# https://repo.webtatic.com/yum/centos/5/SRPMS/repoview/php.html
+# also from RHEL6/CentOS7
+Patch220:      php-5.3.3-CVE-2011-4153.patch
+
+Patch247:      php-5.3.3-CVE-2014-2497.patch
+
+Patch249:      php-5.3.29-CVE-2014-3597.patch
+Patch250:      php-5.3.3-CVE-2014-4698.patch
+Patch251:      php-5.3.3-CVE-2014-4670.patch
+Patch252:      php-5.3.3-CVE-2014-3668.patch
+Patch253:      php-5.3.3-CVE-2014-3669.patch
+Patch254:      php-5.3.3-CVE-2014-3670.patch
+
+Patch256:      php-5.3.29-CVE-2014-8142.patch
+Patch257:      php-5.3.29-CVE-2015-0231.patch
+Patch258:      php-5.3.29-CVE-2015-0232.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}
@@ -214,7 +247,7 @@ BuildRequires:      cyrus-sasl-devel
 BuildRequires: db-devel >= 4.0
 BuildRequires: elfutils-devel
 %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3}
-#BuildRequires:        fcgi-devel
+BuildRequires: file
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 %{?with_system_libzip:BuildRequires:   libzip-devel >= 0.10-3}
 BuildRequires: mysql-devel
@@ -236,13 +269,11 @@ BuildRequires:    libjpeg-devel
 BuildRequires: libltdl-devel >= 1.4
 BuildRequires: libmcrypt-devel >= 2.4.4
 BuildRequires: libpng-devel >= 1.0.8
-#BuildRequires:        libtiff-devel
 %if "%{pld_release}" != "ac"
 BuildRequires: libtool >= 2:2.2
 %else
 BuildRequires: libtool >= 1.4.3
 %endif
-#BuildRequires:        libwrap-devel
 BuildRequires: libxml2-devel >= 1:2.7.6-4
 BuildRequires: libxslt-devel >= 1.1.0
 %{?with_mm:BuildRequires:      mm-devel >= 1.3.0}
@@ -253,7 +284,7 @@ BuildRequires:      openssl-devel >= 0.9.7d
 %{?with_gcov:BuildRequires:    lcov}
 %{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
 %{?with_snmp:BuildRequires:    net-snmp-devel >= 5.0.7}
-%{?with_instantclient:BuildRequires:   oracle-instantclient-devel}
+%{?with_oci:%{?with_instantclient:BuildRequires:       oracle-instantclient-devel}}
 BuildRequires: pam-devel
 %{?with_pcre:BuildRequires:    pcre-devel >= 8.10}
 BuildRequires: pkgconfig
@@ -281,9 +312,6 @@ BuildRequires:      apache-devel >= 2.0.52-2
 BuildRequires: apr-devel >= 1:1.0.0
 BuildRequires: apr-util-devel >= 1:1.0.0
 %endif
-%if %{with fpm}
-#BuildRequires:        judy-devel
-%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                php_sysconfdir          /etc/%{name}
@@ -304,6 +332,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                jsonver         1.2.1
 %define                pharver         2.0.1
 %define                sqlitever       2.0-dev
+%define                sqlite3ver      0.7-dev
 %define                zipver          1.11.0
 
 %define                zend_zts                %{!?with_zts:0}%{?with_zts:1}
@@ -313,7 +342,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %undefine      with_ccache
 %endif
 
-%if %{with oci8}
+%if %{with oci}
 # ORACLE_HOME is required for oci8 ext to build
 %define _preserve_env %_preserve_env_base ORACLE_HOME
 %endif
@@ -375,12 +404,12 @@ PHP - це мова написання скриптів, що вбудовуют
 Summary:       PHP DSO module for Apache 1.3.x
 Summary(pl.UTF-8):     Moduł DSO (Dynamic Shared Object) PHP dla Apache 1.3.x
 Group:         Development/Languages/PHP
-Requires(triggerpostun):       sed >= 4.0
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      apache1(EAPI) >= 1.3.33-2
 Requires:      apache1-mod_mime
 Provides:      webserver(php) = %{version}
 Obsoletes:     apache-mod_php < 1:4.1.1
+Obsoletes:     apache1-mod_php < 4:5.3.28-7
 Obsoletes:     phpfi
 
 %description -n apache1-mod_%{name}
@@ -397,6 +426,7 @@ Requires:   %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      apache(modules-api) = %{apache_modules_api}
 Requires:      apache-mod_mime
 Provides:      webserver(php) = %{version}
+Obsoletes:     apache-mod_php < 4:5.3.28-7
 Obsoletes:     phpfi
 
 %description -n apache-mod_%{name}
@@ -410,7 +440,9 @@ Summary:    PHP for litespeed HTTP server
 Summary(pl.UTF-8):     PHP dla serwera HTTP litespeed
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Provides:      php(litespeed)
 Provides:      webserver(php) = %{version}
+Obsoletes:     php-litespeed < 4:5.3.28-7
 
 %description litespeed
 PHP for litespeed HTTP server.
@@ -426,7 +458,8 @@ Requires:   %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      %{name}-fcgi = %{epoch}:%{version}-%{release}
 Provides:      php(cgi)
 Provides:      php(fcgi)
-Provides:      webserver(php)
+Provides:      webserver(php) = %{version}
+Obsoletes:     php-cgi < 4:5.3.28-7
 Obsoletes:     php-fcgi < 4:5.3.0
 
 %description cgi
@@ -440,6 +473,7 @@ Summary:    PHP as CLI interpreter
 Summary(pl.UTF-8):     PHP jako interpreter działający z linii poleceń
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Obsoletes:     php-cli < 4:5.3.28-7
 
 %description cli
 PHP as CLI interpreter.
@@ -452,6 +486,7 @@ Summary:    PHP library for embedding in applications
 Summary(pl.UTF-8):     Biblioteka PHP do osadzania w aplikacjach
 Group:         Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Obsoletes:     php-embedded < 4:5.3.28-7
 
 %description embedded
 The php-embedded package contains a library which can be embedded into
@@ -467,6 +502,7 @@ 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.
@@ -485,8 +521,14 @@ Requires(pre):     /bin/id
 Requires(pre): /usr/sbin/useradd
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      rc-scripts
+Provides:      php(fcgi)
+Provides:      php(fpm)
 Provides:      user(http)
 Provides:      webserver(php) = %{version}
+Obsoletes:     php-fpm < 4:5.3.28-7
+%if "%{pld_release}" != "ac"
+Conflicts:     logrotate < 3.8.0
+%endif
 
 %description fpm
 PHP FastCGI Process Manager.
@@ -503,7 +545,7 @@ Group:              Libraries
 Requires(post):        sed >= 4.0
 # because of dlclose() bugs in glibc <= 2.3.4 causing SEGVs on exit
 Requires:      glibc >= 6:2.3.5
-Requires:      php-dirs
+Requires:      php-dirs >= 1.4
 Requires:      rpm-whiteout >= 1.28
 Requires:      tzdata
 %if "%{pld_release}" == "ac"
@@ -524,12 +566,13 @@ Provides: %{name}-standard
 Provides:      php(core) = %{version}
 Provides:      php(date)
 Provides:      php(ereg)
-Provides:      php(hash)
 Provides:      php(libxml)
 Provides:      php(reflection)
 Provides:      php(standard)
 %{!?with_mysqlnd:Obsoletes:    php-mysqlnd}
 %{?with_pcre:%requires_ge_to   pcre pcre-devel}
+Suggests:      browscap
+Obsoletes:     php-common < 4:5.3.28-7
 Obsoletes:     php-pecl-domxml
 Conflicts:     php4-common < 3:4.4.4-8
 Conflicts:     rpm < 4.4.2-0.2
@@ -563,13 +606,16 @@ Requires: libtool >= 2:2.2
 %else
 Requires:      libtool
 %endif
-%{?with_embed:Requires:        %{orgname}-embedded = %{epoch}:%{version}-%{release}}
+%{?with_embed:Requires:        %{name}-embedded = %{epoch}:%{version}-%{release}}
 %{?with_pcre:Requires: pcre-devel >= 8.10}
 Requires:      shtool
+Obsoletes:     php-devel
 Obsoletes:     php-pear-devel
 Obsoletes:     php4-devel
 Obsoletes:     php52-devel
 Obsoletes:     php54-devel
+Obsoletes:     php55-devel
+Obsoletes:     php56-devel
 
 %description devel
 The php-devel package lets you compile dynamic extensions to PHP.
@@ -611,6 +657,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.bc.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(bcmath)
+Obsoletes:     php-bcmath < 4:5.3.28-7
 
 %description bcmath
 This is a dynamic shared object (DSO) for PHP that will add bc style
@@ -629,6 +676,7 @@ Requires:   %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(bz2) = %{bz2ver}
 Provides:      php(bzip2)
 Provides:      php-bzip2 = %{epoch}:%{version}-%{release}
+Obsoletes:     php-bz2 < 4:5.3.28-7
 Obsoletes:     php-bzip2 < 4:5.2.14-3
 Obsoletes:     php-pecl-bz2 < %{bz2ver}
 
@@ -646,6 +694,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.calendar.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(calendar)
+Obsoletes:     php-calendar < 4:5.3.28-7
 
 %description calendar
 This is a dynamic shared object (DSO) for PHP that will add calendar
@@ -661,6 +710,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.ctype.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(ctype)
+Obsoletes:     php-ctype < 4:5.3.28-7
 
 %description ctype
 This is a dynamic shared object (DSO) for PHP that will add ctype
@@ -676,6 +726,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.curl.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(curl)
+Obsoletes:     php-curl < 4:5.3.28-7
 
 %description curl
 This is a dynamic shared object (DSO) for PHP that will add curl
@@ -691,6 +742,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.dba.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(dba)
+Obsoletes:     php-dba < 4:5.3.28-7
 
 %description dba
 This is a dynamic shared object (DSO) for PHP that will add flat-file
@@ -710,6 +762,7 @@ Provides:   php(dom)
 # it has some compatibility functions
 Provides:      %{name}-domxml = %{epoch}:%{version}-%{release}
 Provides:      php(domxml)
+Obsoletes:     php-dom < 4:5.3.28-7
 Obsoletes:     php-domxml <= 3:4.3.8-1
 
 %description dom
@@ -726,6 +779,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.exif.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(enchant) = %{enchantver}
+Obsoletes:     php-enchant < 4:5.3.28-7
 Obsoletes:     php-pecl-enchant < %{enchantver}
 
 %description enchant
@@ -755,6 +809,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.exif.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(exif)
+Obsoletes:     php-exif < 4:5.3.28-7
 
 %description exif
 This is a dynamic shared object (DSO) for PHP that will add EXIF tags
@@ -771,6 +826,7 @@ URL:                http://www.php.net/manual/en/book.fileinfo.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pcre = %{epoch}:%{version}-%{release}
 Provides:      php(fileinfo) = %{fileinfover}
+Obsoletes:     php-fileinfo < 4:5.3.28-7
 Obsoletes:     php-mime_magic
 Obsoletes:     php-pecl-fileinfo < %{fileinfover}
 
@@ -797,6 +853,7 @@ URL:                http://www.php.net/manual/en/book.filter.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pcre = %{epoch}:%{version}-%{release}
 Provides:      php(filter)
+Obsoletes:     php-filter < 4:5.3.28-7
 Obsoletes:     php-pecl-filter
 
 %description filter
@@ -820,6 +877,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.ftp.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(ftp)
+Obsoletes:     php-ftp < 4:5.3.28-7
 
 %description ftp
 This is a dynamic shared object (DSO) for PHP that will add FTP
@@ -840,6 +898,7 @@ Requires:   gd(gif)
 Requires:      gd(imagerotate) = 5.2.0
 %endif
 Provides:      php(gd)
+Obsoletes:     php-gd < 4:5.3.28-7
 
 %description gd
 This is a dynamic shared object (DSO) for PHP that will add GD
@@ -856,6 +915,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.gettext.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(gettext)
+Obsoletes:     php-gettext < 4:5.3.28-7
 
 %description gettext
 This is a dynamic shared object (DSO) for PHP that will add gettext
@@ -871,6 +931,7 @@ Group:              Libraries
 URL:           http://www.php.net/manual/en/book.gmp.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(gmp)
+Obsoletes:     php-gmp < 4:5.3.28-7
 
 %description gmp
 This is a dynamic shared object (DSO) for PHP that will add arbitrary
@@ -892,6 +953,7 @@ Provides:   php(mhash)
 Provides:      php-mhash = %{epoch}:%{version}-%{release}
 Obsoletes:     php-mhash < 4:5.3.0
 %endif
+Obsoletes:     php-hash < 4:5.3.28-7
 Obsoletes:     php-pecl-hash < %{hashver}
 
 %description hash
@@ -911,6 +973,7 @@ Requires:   %{_libdir}/gconv
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      iconv
 Provides:      php(iconv)
+Obsoletes:     php-iconv < 4:5.3.28-7
 
 %description iconv
 This is a dynamic shared object (DSO) for PHP that will add iconv
@@ -929,6 +992,7 @@ Requires:   %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pcre = %{epoch}:%{version}-%{release}
 Requires:      imap-lib >= 1:2007e-2
 Provides:      php(imap)
+Obsoletes:     php-imap < 4:5.3.28-7
 
 %description imap
 This is a dynamic shared object (DSO) for PHP that will add IMAP
@@ -948,6 +1012,7 @@ URL:               http://www.php.net/manual/en/book.ibase.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(interbase)
 %{?with_interbase_inst:Autoreq:        false}
+Obsoletes:     php-interbase < 4:5.3.28-7
 
 %description interbase
 This is a dynamic shared object (DSO) for PHP that will add InterBase
@@ -963,6 +1028,7 @@ Group:             Libraries
 URL:           http://www.php.net/intl
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(intl) = %{intlver}
+Obsoletes:     php-intl < 4:5.3.28-7
 Obsoletes:     php-pecl-intl < %{intlver}
 
 %description intl
@@ -984,6 +1050,7 @@ Group:             Libraries
 URL:           http://www.php.net/manual/en/book.json.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(json) = %{jsonver}
+Obsoletes:     php-json < 4:5.3.28-7
 Obsoletes:     php-pecl-json < %{jsonver}
 
 %description json
@@ -1002,6 +1069,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.ldap.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(ldap)
+Obsoletes:     php-ldap < 4:5.3.28-7
 
 %description ldap
 This is a dynamic shared object (DSO) for PHP that will add LDAP
@@ -1020,6 +1088,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.mbstring.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(mbstring)
+Obsoletes:     php-mbstring < 4:5.3.28-7
 
 %description mbstring
 This is a dynamic shared object (DSO) for PHP that will add multibyte
@@ -1035,6 +1104,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.mcrypt.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(mcrypt)
+Obsoletes:     php-mcrypt < 4:5.3.28-7
 
 %description mcrypt
 This is a dynamic shared object (DSO) for PHP that will add mcrypt
@@ -1050,6 +1120,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.mssql.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(mssql)
+Obsoletes:     php-mssql < 4:5.3.28-7
 
 %description mssql
 This is a dynamic shared object (DSO) for PHP that will add MS SQL
@@ -1068,6 +1139,7 @@ URL:              http://www.php.net/manual/en/book.mysql.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 %{?with_mysqlnd:Requires:      %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
 Provides:      php(mysql)
+Obsoletes:     php-mysql < 4:5.3.28-7
 
 %description mysql
 This is a dynamic shared object (DSO) for PHP that will add MySQL
@@ -1088,6 +1160,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 %{?with_mysqlnd:Requires:      %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      php(mysqli)
+Obsoletes:     php-mysqli < 4:5.3.28-7
 
 %description mysqli
 This is a dynamic shared object (DSO) for PHP that will add MySQLi
@@ -1106,6 +1179,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.mysqlnd.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(mysqlnd)
+Obsoletes:     php-mysqlnd < 4:5.3.28-7
 
 %description mysqlnd
 MySQL Native Driver is a replacement for the MySQL Client Library
@@ -1143,6 +1217,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.oci8.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(oci8)
+Obsoletes:     php-oci8 < 4:5.3.28-7
 AutoReq:       false
 
 %description oci8
@@ -1162,6 +1237,7 @@ URL:              http://www.php.net/manual/en/book.uodbc.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      unixODBC >= 2.1.1-3
 Provides:      php(odbc)
+Obsoletes:     php-odbc < 4:5.3.28-7
 
 %description odbc
 This is a dynamic shared object (DSO) for PHP that will add ODBC
@@ -1180,6 +1256,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.openssl.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(openssl)
+Obsoletes:     php-openssl < 4:5.3.28-7
 
 %description openssl
 This is a dynamic shared object (DSO) for PHP that will add OpenSSL
@@ -1195,6 +1272,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.pcntl.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(pcntl)
+Obsoletes:     php-pcntl < 4:5.3.28-7
 
 %description pcntl
 This is a dynamic shared object (DSO) for PHP that will add process
@@ -1211,6 +1289,7 @@ Summary(pl.UTF-8):        Moduł PCRE dla PHP
 Group:         Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(pcre)
+Obsoletes:     php-pcre < 4:5.3.28-7
 
 %description pcre
 This is a dynamic shared object (DSO) for PHP that will add Perl
@@ -1228,6 +1307,7 @@ URL:              http://www.php.net/manual/en/book.pdo.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      php(pdo)
+Obsoletes:     php-pdo < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO
 
 %description pdo
@@ -1245,6 +1325,7 @@ URL:              http://www.php.net/manual/en/ref.pdo-dblib.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(dblib)
+Obsoletes:     php-pdo-dblib < 4:5.3.28-7
 
 %description pdo-dblib
 This is a dynamic shared object (DSO) for PHP that will add PDO
@@ -1262,6 +1343,7 @@ URL:              http://www.php.net/manual/en/ref.pdo-firebird.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-firebird)
+Obsoletes:     php-pdo-firebird < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_FIREBIRD
 
 %description pdo-firebird
@@ -1281,6 +1363,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 %{?with_mysqlnd:Requires:      %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-mysql)
+Obsoletes:     php-pdo-mysql < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_MYSQL
 
 %description pdo-mysql
@@ -1299,6 +1382,7 @@ URL:              http://www.php.net/manual/en/ref.pdo-oci.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-oci)
+Obsoletes:     php-pdo-oci < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_OCI
 
 %description pdo-oci
@@ -1317,6 +1401,7 @@ URL:              http://www.php.net/manual/en/ref.pdo-odbc.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-odbc)
+Obsoletes:     php-pdo-odbc < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_ODBC
 
 %description pdo-odbc
@@ -1336,6 +1421,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-pgsql)
 Provides:      php-pecl-PDO_PGSQL
+Obsoletes:     php-pdo-pgsql < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_PGSQL < 4:5.2.1-2
 
 %description pdo-pgsql
@@ -1354,6 +1440,7 @@ URL:              http://www.php.net/manual/en/ref.pdo-sqlite.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-sqlite)
+Obsoletes:     php-pdo-sqlite < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_SQLITE
 
 %description pdo-sqlite
@@ -1371,6 +1458,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.pgsql.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(pgsql)
+Obsoletes:     php-pgsql < 4:5.3.28-7
 
 %description pgsql
 This is a dynamic shared object (DSO) for PHP that will add PostgreSQL
@@ -1394,6 +1482,7 @@ Suggests: %{name}-cli
 Suggests:      %{name}-zlib
 Provides:      php(phar) = %{pharver}
 Obsoletes:     php-pecl-phar < %{pharver}
+Obsoletes:     php-phar < 4:5.3.28-7
 Conflicts:     php-ioncube < 4.0.9
 
 %description phar
@@ -1410,6 +1499,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.posix.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(posix)
+Obsoletes:     php-posix < 4:5.3.28-7
 
 %description posix
 This is a dynamic shared object (DSO) for PHP that will add POSIX
@@ -1425,6 +1515,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.pspell.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(pspell)
+Obsoletes:     php-pspell < 4:5.3.28-7
 
 %description pspell
 This is a dynamic shared object (DSO) for PHP that will add pspell
@@ -1442,6 +1533,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.readline.php
 Requires:      %{name}-cli = %{epoch}:%{version}-%{release}
 Provides:      php(readline)
+Obsoletes:     php-readline < 4:5.3.28-7
 
 %description readline
 This PHP module adds support for readline functions (only for cli and
@@ -1458,6 +1550,7 @@ URL:              http://www.php.net/manual/en/book.recode.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      recode >= 3.5d-3
 Provides:      php(recode)
+Obsoletes:     php-recode < 4:5.3.28-7
 
 %description recode
 This is a dynamic shared object (DSO) for PHP that will add recode
@@ -1474,7 +1567,9 @@ Group:            Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
 Suggests:      %{name}-hash = %{epoch}:%{version}-%{release}
+Suggests:      tmpwatch
 Provides:      php(session)
+Obsoletes:     php-session < 4:5.3.28-7
 
 %description session
 This is a dynamic shared object (DSO) for PHP that will add session
@@ -1490,6 +1585,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.shmop.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(shmop)
+Obsoletes:     php-shmop < 4:5.3.28-7
 
 %description shmop
 This is a dynamic shared object (DSO) for PHP that will add Shared
@@ -1506,6 +1602,7 @@ URL:              http://www.php.net/manual/en/book.simplexml.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      php(simplexml)
+Obsoletes:     php-simplexml < 4:5.3.28-7
 
 %description simplexml
 This is a dynamic shared object (DSO) for PHP that will add Simple XML
@@ -1522,6 +1619,7 @@ URL:              http://www.php.net/manual/en/book.snmp.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-sockets = %{epoch}:%{version}-%{release}
 Provides:      php(snmp)
+Obsoletes:     php-snmp < 4:5.3.28-7
 
 %description snmp
 This is a dynamic shared object (DSO) for PHP that will add SNMP
@@ -1537,6 +1635,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.soap.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(soap)
+Obsoletes:     php-soap < 4:5.3.28-7
 
 %description soap
 This is a dynamic shared object (DSO) for PHP that will add SOAP/WSDL
@@ -1552,6 +1651,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.sockets.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(sockets)
+Obsoletes:     php-sockets < 4:5.3.28-7
 
 %description sockets
 This is a dynamic shared object (DSO) for PHP that will add sockets
@@ -1569,6 +1669,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pcre = %{epoch}:%{version}-%{release}
 Requires:      %{name}-simplexml = %{epoch}:%{version}-%{release}
 Provides:      php(spl)
+Obsoletes:     php-spl < 4:5.3.28-7
 
 %description spl
 This is a dynamic shared object (DSO) for PHP that will add Standard
@@ -1587,6 +1688,7 @@ Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      php(sqlite) = %{sqlitever}
 Obsoletes:     php-pecl-SQLite < %{sqlitever}
+Obsoletes:     php-sqlite < 4:5.3.28-7
 
 %description sqlite
 SQLite is a C library that implements an embeddable SQL database
@@ -1614,7 +1716,8 @@ Summary(pl.UTF-8):        Moduł SQLite3 dla PHP
 Group:         Libraries
 URL:           http://php.net/manual/en/book.sqlite3.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Provides:      php(sqlite3)
+Provides:      php(sqlite3) = %{sqlite3ver}
+Obsoletes:     php-sqlite3 < 4:5.3.28-7
 
 %description sqlite3
 SQLite is a C library that implements an embeddable SQL database
@@ -1644,6 +1747,7 @@ URL:              http://www.php.net/manual/en/book.sybase.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(sybase-ct)
 Obsoletes:     php-sybase
+Obsoletes:     php-sybase-ct < 4:5.3.28-7
 
 %description sybase-ct
 This is a dynamic shared object (DSO) for PHP that will add Sybase and
@@ -1660,6 +1764,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.sem.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(sysvmsg)
+Obsoletes:     php-sysvmsg < 4:5.3.28-7
 
 %description sysvmsg
 This is a dynamic shared object (DSO) for PHP that will add SysV
@@ -1675,6 +1780,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.sem.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(sysvsem)
+Obsoletes:     php-sysvsem < 4:5.3.28-7
 
 %description sysvsem
 This is a dynamic shared object (DSO) for PHP that will add SysV
@@ -1690,6 +1796,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.shmop.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(sysvshm)
+Obsoletes:     php-sysvshm < 4:5.3.28-7
 
 %description sysvshm
 This is a dynamic shared object (DSO) for PHP that will add SysV
@@ -1719,6 +1826,7 @@ URL:              http://www.php.net/manual/en/book.tidy.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      tidy
 Provides:      php(tidy)
+Obsoletes:     php-tidy < 4:5.3.28-7
 
 %description tidy
 This is a dynamic shared object (DSO) for PHP that will add Tidy
@@ -1734,6 +1842,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.tokenizer.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(tokenizer)
+Obsoletes:     php-tokenizer < 4:5.3.28-7
 
 %description tokenizer
 This is a dynamic shared object (DSO) for PHP that will add tokenizer
@@ -1754,6 +1863,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 #Requires:     %{name}-session = %{epoch}:%{version}-%{release}
 Requires:      %{name}-xml = %{epoch}:%{version}-%{release}
 Provides:      php(wddx)
+Obsoletes:     php-wddx < 4:5.3.28-7
 
 %description wddx
 This is a dynamic shared object (DSO) for PHP that will add wddx
@@ -1769,6 +1879,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.xml.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(xml)
+Obsoletes:     php-xml < 4:5.3.28-7
 
 %description xml
 This is a dynamic shared object (DSO) for PHP that will add XML
@@ -1786,8 +1897,9 @@ Summary(pl.UTF-8):        Moduł XML Reader dla PHP
 Group:         Libraries
 URL:           http://www.php.net/manual/en/book.xmlreader.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Suggests:      %{name}-dom = %{epoch}:%{version}-%{release}
+Requires:      %{name}-dom = %{epoch}:%{version}-%{release}
 Provides:      php(xmlreader)
+Obsoletes:     php-xmlreader < 4:5.3.28-7
 
 %description xmlreader
 This is a dynamic shared object (DSO) for PHP that will add XML Reader
@@ -1808,6 +1920,7 @@ URL:              http://www.php.net/manual/en/book.xmlrpc.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-xml = %{epoch}:%{version}-%{release}
 Provides:      php(xmlrpc)
+Obsoletes:     php-xmlrpc < 4:5.3.28-7
 
 %description xmlrpc
 This is a dynamic shared object (DSO) for PHP that will add XMLRPC
@@ -1824,6 +1937,7 @@ URL:              http://www.php.net/manual/en/book.xmlwriter.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(xmlwriter)
 Obsoletes:     php-pecl-xmlwriter
+Obsoletes:     php-xmlwriter < 4:5.3.28-7
 
 %description xmlwriter
 This extension wraps the libxml xmlWriter API. Represents a writer
@@ -1845,6 +1959,7 @@ Requires: %{name}-dom = %{epoch}:%{version}-%{release}
 Requires:      libxslt >= 1.0.18
 # actually not true, functionality is similar, but API differs
 Provides:      php(xsl)
+Obsoletes:     php-xsl < 4:5.3.28-7
 Obsoletes:     php-xslt <= 3:4.3.8-1
 
 %description xsl
@@ -1863,6 +1978,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release}
 %{?with_system_libzip:Requires:        libzip >= 0.10-3}
 Provides:      php(zip) = %{zipver}
 Obsoletes:     php-pecl-zip < %{zipver}
+Obsoletes:     php-zip < 4:5.3.28-7
 
 %description zip
 Zip is an extension to create, modify and read zip files.
@@ -1878,6 +1994,7 @@ Group:            Libraries
 URL:           http://www.php.net/manual/en/book.zlib.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(zlib)
+Obsoletes:     php-zlib < 4:5.3.28-7
 
 %description zlib
 This is a dynamic shared object (DSO) for PHP that will add zlib
@@ -1888,8 +2005,6 @@ Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
 %setup -q -n %{orgname}-%{version}
-# prep for suhosin patch
-%{__sed} -i -e 's,\r$,,' Zend/Zend.dsp Zend/ZendTS.dsp
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -1906,6 +2021,7 @@ cp -p php.ini-production php.ini
 %if %{with type_hints}
 %patch12 -p0
 %endif
+%patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch17 -p1
@@ -1932,6 +2048,7 @@ cp -p php.ini-production php.ini
 %patch38 -p1
 %patch39 -p1
 %if %{with fpm}
+%patch69 -p1
 %patch41 -p1
 %patch42 -p1
 %endif
@@ -1942,6 +2059,8 @@ cp -p php.ini-production php.ini
 %if %{with suhosin}
 %patch47 -p1
 %endif
+%patch68 -p1
+%patch48 -p1
 %patch49 -p1
 %patch50 -p1
 %patch51 -p1
@@ -1958,6 +2077,23 @@ cp -p php.ini-production php.ini
 %{__rm} -r sapi/litespeed
 gzip -dc %{SOURCE15} | tar xf - -C sapi/
 %patch67 -p1
+%patch70 -p1
+%patch71 -p1
+
+%patch220 -p1
+
+%patch247 -p1
+
+%patch249 -p1
+%patch250 -p1
+%patch251 -p1
+%patch252 -p1
+%patch253 -p1
+%patch254 -p1
+
+%patch256 -p1
+%patch257 -p1
+%patch258 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
@@ -2036,6 +2172,12 @@ if test "$ver" != "%{pharver}"; then
        : Update the pharver macro and rebuild.
        exit 1
 fi
+ver=$(sed -n '/#define PHP_SQLITE3_VERSION/{s/.* "//;s/".*$//;p}' ext/sqlite3/php_sqlite3.h)
+if test "$ver" != "%{sqlite3ver}"; then
+       : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}.
+       : Update the sqlite3ver macro and rebuild.
+       exit 1
+fi
 ver=$(sed -n '/#define PHP_ZIP_VERSION_STRING /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h)
 if test "$ver" != "%{zipver}"; then
        : Error: Upstream ZIP version is now ${ver}, expecting %{zipver}.
@@ -2084,6 +2226,8 @@ export EXTENSION_DIR="%{php_extensiondir}"
 if [ ! -f _built-conf ]; then
        # now remove Makefile copies
        rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed}
+       # force regeneration
+       touch Zend/zend_language_parser.y
        %{__libtoolize}
        %{__aclocal}
        cp -f /usr/share/automake/config.* .
@@ -2192,7 +2336,7 @@ for sapi in $sapis; do
        %{?with_mhash:--with-mhash=yes} \
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
        --with-pdo-mysql=shared%{?with_mysqlnd:,mysqlnd} \
-       %{?with_oci8:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
+       %{?with_oci:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
        %{?with_pgsql:--with-pdo-pgsql=shared} \
        %{?with_pdo_sqlite:--with-pdo-sqlite=shared,/usr} \
@@ -2230,10 +2374,10 @@ for sapi in $sapis; do
        --with-mcrypt=shared \
        %{?with_mm:--with-mm} \
        %{?with_mssql:--with-mssql=shared} \
-       %{?with_mysqlnd:--with-mysqlnd=shared} \
+       %{?with_mysqlnd:--enable-mysqlnd=shared} \
        --with-mysql=shared%{?with_mysqlnd:,mysqlnd} \
        %{?with_mysqli:--with-mysqli=shared%{?with_mysqlnd:,mysqlnd}} \
-       %{?with_oci8:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
+       %{?with_oci:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_openssl:--with-openssl=shared} \
        %{?with_kerberos5:--with-kerberos} \
        %{__with_without pcre pcre-regex /usr} \
@@ -2392,19 +2536,27 @@ install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cg
 cp -pf php_config.h.cli main/php_config.h
 cp -pf Makefile.cli Makefile
 %{__make} install \
+       phpbuilddir=%{_libdir}/%{name}/build \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # make link relative
 ln -sfn phar.phar $RPM_BUILD_ROOT%{_bindir}/phar
 
+# version suffix
+v=$(echo %{version} | cut -d. -f1-2)
+
 # install Apache1 DSO module
 %if %{with apache1}
 libtool --mode=install install -p sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache1
+mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.so
 %endif
 
 # install Apache2 DSO module
 %if %{with apache2}
 libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache
+mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
 %endif
 
 # install litespeed sapi
@@ -2428,17 +2580,21 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/fpm.d,%{_sbindir},%{_datadir}/fpm}
 libtool --mode=install install -p sapi/fpm/php-fpm $RPM_BUILD_ROOT%{_sbindir}/%{name}-fpm
 cp -p sapi/fpm/php-fpm.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}-fpm.8
 cp -p sapi/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p sapi/fpm/php-fpm.conf-d $RPM_BUILD_ROOT%{_sysconfdir}/fpm.d/www.conf
 cp -p sapi/fpm/status.html $RPM_BUILD_ROOT%{_datadir}/fpm
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 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}#
        s#/etc/php#%{_sysconfdir}#
        s#@processname@#%{name}-fpm#g
-' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf}
+' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf,%{_sysconfdir}/fpm.d/www.conf}
 %endif
 
 # install Embedded API
@@ -2450,15 +2606,19 @@ cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
 %endif
 
 # install CLI
-libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli
-cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php.1
-echo ".so php.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.cli.1
-ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php
+# 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
+echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
+ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
 
-sed -e 's#%{_prefix}/lib/php#%{_libdir}/php#g' php.ini > $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
+# .cli extension is installed only if default php.spec in distro for legacy purposes
+%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac"
+ln -s php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php.cli
+%endif
 
+cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
-cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/browscap.ini
 
 %if %{with apache1}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf
@@ -2489,17 +2649,20 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d
 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}/php/build
-       for i in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do
-               ln -snf %{_aclocaldir}/${i} $RPM_BUILD_ROOT%{_libdir}/php/build
-       done
-       ln -snf %{_datadir}/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/php/build
-%else
-       ln -snf %{_aclocaldir}/libtool.m4 $RPM_BUILD_ROOT%{_libdir}/php/build
-       ln -snf %{_datadir}/libtool/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/php/build
-%endif
-ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/php/build
+ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build
+ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/%{name}/build
+for fn in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do
+       f=%{_aclocaldir}/$fn
+       test -f $f || continue
+       ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build
+done
+for fn in ltmain.sh config/ltmain.sh build-aux/ltmain.sh; do
+       f=/usr/share/libtool/$fn
+       test -f $f || continue
+       ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build
+       break
+done
+sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize
 
 # for php-pecl-mailparse
 install -d $RPM_BUILD_ROOT%{_includedir}/php/ext/mbstring
@@ -2517,7 +2680,7 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c
 sed -i -e "/dependency_libs/ s,/[^ ]*/libs/libphp_common.la,%{_libdir}/libphp_common.la," $RPM_BUILD_ROOT%{_libdir}/libphp5.la
 %endif
 # better solution?
-sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/php/build/acinclude.m4
+sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -2550,7 +2713,7 @@ fi
 %service %{name}-fpm restart
 
 %preun fpm
-if [ "$1" = 0 ]; then
+if [ "$1" = "0" ]; then
        %service %{name}-fpm stop
        /sbin/chkconfig --del %{name}-fpm
 fi
@@ -2587,6 +2750,35 @@ fi
 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
 
+%triggerpostun common -- php-common < 4:5.3.28-7
+# migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
+# do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
+# this way we can stick to one trigger, instead of attaching one for each (sub)package!
+for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
+       test -f "$f" || continue
+       bn=${f#/etc/php/}
+       dn=${bn%/*}
+       fn=${bn#*/}
+       test "$dn" = "$fn" && dn=
+       fn=${fn%.rpmsave}
+       nf=%{_sysconfdir}/$dn/$fn
+       test -f "$nf" || continue
+       cp -vfb $nf{,.rpmnew}
+       cp -vfb $f $nf
+       %{__sed} -i -e '
+               s#%{_libdir}/php#%{_libdir}/%{name}#
+               s#/etc/php#%{_sysconfdir}#
+       ' $nf
+done
+
+%triggerpostun common -- %{name}-common < 4:5.3.29-7, php-common < 4:5.3.29-7
+# switch to browscap package if the ini file has original value
+%{__sed} -i -e 's#%{_sysconfdir}/browscap.ini#/usr/share/browscap/php_browscap.ini#' %{_sysconfdir}/php.ini
+# disable browscap, if optional package not present
+if [ ! -e /usr/share/browscap/php_browscap.ini ]; then
+       %{__sed} -i -e 's#^browscap = /usr/share/browscap/php_browscap.ini#;&#' %{_sysconfdir}/php.ini
+fi
+
 # common macros called at extension post/postun scriptlet
 %define        extension_scripts() \
 %post %1 \
@@ -2678,6 +2870,7 @@ fi
 %dir %{_sysconfdir}/apache.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
 %attr(755,root,root) %{_libdir}/apache1/libphp5.so
+%attr(755,root,root) %{_libdir}/apache1/libphp5-*.*.so
 %endif
 
 %if %{with apache2}
@@ -2687,6 +2880,7 @@ fi
 %dir %{_sysconfdir}/apache2handler.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
 %attr(755,root,root) %{_libdir}/apache/libphp5.so
+%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
 %endif
 
 %if %{with litespeed}
@@ -2714,8 +2908,13 @@ fi
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/cli.d
 %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*
+
+# legacy. do we really need it?
+%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac"
 %attr(755,root,root) %{_bindir}/php.cli
-%{_mandir}/man1/php.cli.1*
+%endif
 
 %files program
 %defattr(644,root,root,755)
@@ -2728,6 +2927,7 @@ fi
 %doc sapi/fpm/{CREDITS,LICENSE}
 %dir %{_sysconfdir}/fpm.d
 %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
 %{_mandir}/man8/%{name}-fpm.8*
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-fpm
@@ -2742,7 +2942,6 @@ fi
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/browscap.ini
 %attr(755,root,root) %{_libdir}/libphp_common-*.so
 %dir %{php_extensiondir}
 
@@ -2756,7 +2955,7 @@ fi
 %attr(755,root,root) %{_libdir}/libphp_common.so
 %{_libdir}/libphp_common.la
 %{_includedir}/php
-%{_libdir}/php/build
+%{_libdir}/%{name}/build
 %{_mandir}/man1/php-config.1*
 %{_mandir}/man1/phpize.1*
 %if %{with embed}
@@ -2798,6 +2997,7 @@ fi
 
 %files dba
 %defattr(644,root,root,755)
+%doc ext/dba/{CREDITS,README}
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dba.ini
 %attr(755,root,root) %{php_extensiondir}/dba.so
 
@@ -2949,7 +3149,7 @@ fi
 %attr(755,root,root) %{php_extensiondir}/mysqlnd.so
 %endif
 
-%if %{with oci8}
+%if %{with oci}
 %files oci8
 %defattr(644,root,root,755)
 %doc ext/oci8/{CREDITS,README}
@@ -3015,7 +3215,7 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_mysql.ini
 %attr(755,root,root) %{php_extensiondir}/pdo_mysql.so
 
-%if %{with oci8}
+%if %{with oci}
 %files pdo-oci
 %defattr(644,root,root,755)
 %doc ext/pdo_oci/CREDITS
This page took 8.068429 seconds and 4 git commands to generate.