]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
- release 2, rebuild against icu 64
[packages/php.git] / php.spec
index b6c6c05d02c550c1776954fe3c658f3100aff61d..0ed22ff9ac2211eb9642a9196b434f52dbd89d48 100644 (file)
--- a/php.spec
+++ b/php.spec
 # standard
 #
 # Conditional build:
+# - packaging options
+%bcond_without alternatives    # use alternatives system to select default phar and php-fpm
+%bcond_with    default_php     # build this PHP as default PHP in system (disables alternatives)
 # - General options:
 %bcond_without embed           # disable building Embedded API
-%bcond_with    default_php     # use this PHP as default PHP in distro
 %bcond_with    gcov            # Enable Code coverage reporting
-%bcond_without instantclient   # build Oracle oci8 extension module against oracle-instantclient package
-%bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
 %bcond_without kerberos5       # without Kerberos5 support
-%bcond_with    mm              # without mm support for session storage
-%bcond_with    suhosin         # with suhosin patch, has little point in PHP>=5.3, see https://github.com/stefanesser/suhosin/issues/42#issuecomment-41728178
-%bcond_with    system_gd       # with system gd (imageantialias function is missing then)
-%bcond_with    system_libzip   # with system libzip (reported broken currently)
 %bcond_with    systemtap       # systemtap/DTrace support
 %bcond_with    tests           # default off; test process very often hangs on builders, approx run time 45m; perform "make test"
-%bcond_without webp            # Without WebP support in GD extension (imagecreatefromwebp)
 %bcond_with    zts             # Zend Thread Safety
+%bcond_with    debug           # Zend Debug Build
 # - SAPI
 %bcond_without apache2         # disable building Apache 2.x SAPI
 %bcond_without cgi             # disable CGI/FCGI SAPI
 %bcond_without tidy            # without Tidy extension module
 %bcond_without wddx            # without WDDX extension module
 %bcond_without xmlrpc          # without XML-RPC extension module
+# extensions options
+%bcond_without instantclient   # build Oracle oci8 extension module against oracle-instantclient package
+%bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
+%bcond_with    mm              # without mm support for session storage
+%bcond_with    system_gd       # with system gd (imageantialias function is missing then)
+%bcond_with    system_libzip   # with system libzip (reported broken currently)
+%bcond_without webp            # Without WebP support in GD extension (imagecreatefromwebp)
 
 %define apxs1          /usr/sbin/apxs1
 %define        apxs2           /usr/sbin/apxs
 %undefine      with_litespeed
 %endif
 
+%if %{with default_php}
+%undefine      with_alternatives
+%endif
+
 # mm is not thread safe
 %if %{with zts}
 %undefine      with_mm
 %undefine      with_filter
 %endif
 
-%define                rel             0.5
-%define                subver  beta1
 %define                orgname php
 %define                ver_suffix 71
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -145,17 +150,16 @@ Summary(pt_BR.UTF-8):     A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       7.1.0
-Release:       0.%{subver}.%{rel}
+Version:       7.1.28
+Release:       2
 Epoch:         4
 # 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://php.net/distributions/%{orgname}-%{version}.tar.xz
-Source0:       https://downloads.php.net/~ab/php-%{version}%{subver}.tar.xz
-# Source0-md5: f63c3acc5c15e69853a164b40e107d7f
+Source0:       https://php.net/distributions/%{orgname}-%{version}.tar.xz
+# Source0-md5: 578999c52c48316d6d95597c65c66310
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
@@ -190,9 +194,6 @@ Patch27:    %{orgname}-config-dir.patch
 Patch29:       %{orgname}-fcgi-graceful.patch
 Patch31:       %{orgname}-fcgi-error_log-no-newlines.patch
 Patch34:       %{orgname}-libtool.patch
-#Patch36:      %{orgname}-mysql-charsetphpini.patch
-#Patch37:      %{orgname}-mysqli-charsetphpini.patch
-#Patch38:      %{orgname}-pdo_mysql-charsetphpini.patch
 Patch39:       %{orgname}-use-prog_sendmail.patch
 Patch41:       %{orgname}-fpm-config.patch
 Patch42:       %{orgname}-fpm-shared.patch
@@ -200,7 +201,6 @@ Patch43:    %{orgname}-silent-session-cleanup.patch
 Patch44:       %{orgname}-include_path.patch
 Patch45:       %{orgname}-imap-annotations.patch
 Patch46:       %{orgname}-imap-myrights.patch
-Patch47:       suhosin.patch
 Patch50:       extension-shared-optional-dep.patch
 Patch51:       spl-shared.patch
 Patch52:       pcre-shared.patch
@@ -214,7 +214,6 @@ Patch66:    php-db.patch
 Patch67:       mysql-lib-ver-mismatch.patch
 # https://bugs.php.net/bug.php?id=68344
 Patch68:       php-mysql-ssl-context.patch
-Patch69:       fpm-conf-split.patch
 Patch70:       mysqlnd-ssl.patch
 Patch71:       libdb-info.patch
 Patch72:       phar-hash-shared.patch
@@ -231,11 +230,6 @@ BuildRequires:     db-devel >= 4.0
 BuildRequires: elfutils-devel
 %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3}
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
-%{?with_fpm:BuildRequires:     libapparmor-devel}
-%{?with_system_libzip:BuildRequires:   libzip-devel >= 0.10.1-2}
-%{!?with_mysqlnd:BuildRequires:        mysql-devel}
-BuildRequires: pkgconfig
-BuildRequires: sed >= 4.0
 %if %{with pdo_dblib}
 BuildRequires: freetds-devel >= 0.82
 %endif
@@ -246,6 +240,8 @@ BuildRequires:      gd-devel >= 2.1
 BuildRequires: gdbm-devel
 BuildRequires: gmp-devel >= 4.2
 %{?with_imap:BuildRequires:    imap-devel >= 1:2007e-2}
+%{?with_gcov:BuildRequires:    lcov}
+%{?with_fpm:BuildRequires:     libapparmor-devel}
 %{?with_intl:BuildRequires:    libicu-devel >= 4.4}
 BuildRequires: libjpeg-devel
 BuildRequires: libltdl-devel >= 1.4
@@ -253,7 +249,6 @@ BuildRequires:      libmcrypt-devel >= 2.5.6
 BuildRequires: libpng-devel >= 1.0.8
 %{?with_intl:BuildRequires:    libstdc++-devel}
 %{?with_webp:BuildRequires:    libwebp-devel}
-BuildRequires: tokyocabinet-devel
 %if "%{pld_release}" != "ac"
 BuildRequires: libtool >= 2:2.4.6
 %else
@@ -261,14 +256,16 @@ BuildRequires:    libtool >= 1.4.3
 %endif
 BuildRequires: libxml2-devel >= 1:2.7.6-4
 BuildRequires: libxslt-devel >= 1.1.0
+%{?with_system_libzip:BuildRequires:   libzip-devel >= 0.10.1-2}
+%{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
 %{?with_mm:BuildRequires:      mm-devel >= 1.3.0}
+%{!?with_mysqli:BuildRequires: mysql-devel >= 4.1.13}
+%{!?with_pdo_mysql:BuildRequires:      mysql-devel}
+%{?with_snmp:BuildRequires:    net-snmp-devel >= 5.3}
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 %if %{with openssl} || %{with ldap}
 BuildRequires: openssl-devel >= 1.0.1
 %endif
-%{?with_gcov:BuildRequires:    lcov}
-%{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
-%{?with_snmp:BuildRequires:    net-snmp-devel >= 5.0.7}
 %{?with_oci:%{?with_instantclient:BuildRequires:       oracle-instantclient-devel}}
 BuildRequires: pam-devel
 %{?with_pcre:BuildRequires:    pcre-devel >= 8.10}
@@ -279,16 +276,18 @@ BuildRequires:    readline-devel
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpmbuild(macros) >= 1.566
-%{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
-BuildRequires: tar >= 1:1.22
-BuildRequires: xz
+BuildRequires: sed >= 4.0
 %if %{with sqlite3} || %{with pdo_sqlite}
 BuildRequires: sqlite3-devel >= 3.3.9
 %endif
+%{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
+BuildRequires: tar >= 1:1.22
 %{?with_tidy:BuildRequires:    tidy-devel}
+BuildRequires: tokyocabinet-devel
 %{?with_odbc:BuildRequires:    unixODBC-devel}
 %{?with_xmlrpc:BuildRequires:  xmlrpc-epi-devel >= 0.54.1}
-BuildRequires: zlib-devel >= 1.0.9
+BuildRequires: xz
+BuildRequires: zlib-devel >= 1.2.0.4
 %if %{with apache2}
 BuildRequires: apache-devel >= 2.0.52-2
 BuildRequires: apr-devel >= 1:1.0.0
@@ -301,25 +300,25 @@ BuildRoot:        %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _sysconfdir                     %{php_sysconfdir}
 
 # must be in sync with source. extra check ensuring that it is so is done in %%build
-%define                php_api_version         20151012
+%define                php_api_version         20160303
 %define                zend_module_api         20160303
 %define                zend_extension_api      320160303
 %define                php_pdo_api_version     20150127
 
 # Extension versions
 %define                bz2ver          1.0
-%define                enchantver      1.1.0
+%define                enchantver      %{version}
 %define                fileinfover     1.0.5
 %define                hashver         1.0
 %define                intlver         1.1.0
-%define                jsonver         1.4.0
+%define                jsonver         1.5.0
 %define                pharver         2.0.2
-%define                sqlite3ver      0.7-dev
-%define                zipver          1.13.3
+%define                sqlite3ver      %{version}
+%define                zipver          1.13.5
 %define                phpdbgver       0.5.0
 
 %define                _zend_zts               %{!?with_zts:0}%{?with_zts:1}
-%define                php_debug               %{!?debug:0}%{?debug:1}
+%define                php_debug               %{!?with_debug:0}%{?with_debug:1}
 
 %if %{with gcov}
 %undefine      with_ccache
@@ -384,20 +383,33 @@ PHP - це мова написання скриптів, що вбудовуют
 використання PHP - заміна для CGI скриптів.
 
 %package -n apache-mod_%{name}
-Summary:       PHP DSO module for Apache 2.x
-Summary(pl.UTF-8):     Moduł DSO (Dynamic Shared Object) PHP dla Apache 2.x
+Summary:       PHP support for Apache 2.x
+Summary(pl.UTF-8):     Wsparcie PHP dla Apache 2.x
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Requires:      apache(modules-api) = %{apache_modules_api}
-Requires:      apache-mod_mime
+Requires:      apache-mod_%{name}-core = %{epoch}:%{version}-%{release}
 Provides:      webserver(php) = %{version}
 Obsoletes:     apache-mod_php < 4:5.3.28-7
 Obsoletes:     phpfi
 
 %description -n apache-mod_%{name}
-PHP as DSO module for Apache 2.x.
+PHP support for Apache 2.x.
 
 %description -n apache-mod_%{name} -l pl.UTF-8
+Wsparcie PHP dla Apache 2.x.
+
+%package -n apache-mod_%{name}-core
+Summary:       PHP DSO module for Apache 2.x
+Summary(pl.UTF-8):     Moduł DSO (Dynamic Shared Object) PHP dla Apache 2.x
+Group:         Development/Languages/PHP
+Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      apache(modules-api) = %{apache_modules_api}
+Requires:      apache-mod_mime
+
+%description -n apache-mod_%{name}-core
+PHP as DSO module for Apache 2.x.
+
+%description -n apache-mod_%{name}-core -l pl.UTF-8
 PHP jako moduł DSO (Dynamic Shared Object) dla Apache 2.x.
 
 %package litespeed
@@ -485,6 +497,8 @@ Requires(postun):   /usr/sbin/userdel
 Requires(pre): /bin/id
 Requires(pre): /usr/sbin/useradd
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+%{?with_alternatives:Requires: alternatives}
+Requires:      php-dirs >= 1.4-2
 Requires:      rc-scripts
 Provides:      php(fcgi)
 Provides:      php(fpm)
@@ -503,6 +517,7 @@ PHP FastCGI Process Manager - zarządca procesów FastCGI.
 
 %package phpdbg
 Summary:       The debugging platform for PHP 5.4+
+Summary(pl.UTF-8):     Platforma diagnostyczna dla PHP 5.4+
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Provides:      php(phpdbg) = %{phpdbgver}
@@ -517,6 +532,15 @@ your code.
 phpdbg aims to be a lightweight, powerful, easy to use debugging
 platform for PHP 5.4+
 
+%description phpdbg -l pl.UTF-8
+phpdbg - interaktywny debugger dla PHP.
+
+Jest zaimplementowany jako moduł SAPI, potrafi przejąć pełną kontrolę
+nad środowiskiem bez wpływu na zachowanie lub wydajność kodu.
+
+Narzędzie powstało jako lekka, mająca duże możliwości, łatwa w użyciu
+platforma diagnostyczna dla PHP 5.4+.
+
 %package common
 Summary:       Common files needed by both Apache modules and CGI/CLI SAPIs
 Summary(pl.UTF-8):     Wspólne pliki dla modułu Apache'a i programu CGI
@@ -529,6 +553,7 @@ Requires:   glibc >= 6:2.3.5
 Requires:      php-dirs >= 1.4
 Requires:      rpm-whiteout >= 1.28
 Requires:      tzdata
+Requires:      zlib >= 1.2.0.4
 Provides:      %{name}(debug) = %{php_debug}
 Provides:      %{name}(modules_api) = %{php_api_version}
 Provides:      %{name}(thread-safety) = %{_zend_zts}
@@ -599,6 +624,9 @@ Obsoletes:  php53-devel
 Obsoletes:     php54-devel
 Obsoletes:     php55-devel
 Obsoletes:     php56-devel
+Obsoletes:     php70-devel
+Obsoletes:     php72-devel
+Obsoletes:     php73-devel
 
 %description devel
 The php-devel package lets you compile dynamic extensions to PHP.
@@ -1112,6 +1140,7 @@ URL:              http://php.net/manual/en/book.mysqli.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 %{?with_mysqlnd:Requires:      %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
+Requires:      mysql-libs >= 4.1.13
 Provides:      php(mysqli)
 Obsoletes:     php-mysqli < 4:5.3.28-7
 
@@ -1304,7 +1333,7 @@ Group:            Libraries
 URL:           http://php.net/manual/en/ref.pdo-dblib.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
-Provides:      php(dblib)
+Provides:      php(pdo_dblib)
 Obsoletes:     php-pdo-dblib < 4:5.3.28-7
 
 %description pdo-dblib
@@ -1323,6 +1352,7 @@ URL:              http://php.net/manual/en/ref.pdo-firebird.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-firebird)
+Provides:      php(pdo_firebird)
 Obsoletes:     php-pdo-firebird < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_FIREBIRD
 
@@ -1343,6 +1373,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)
+Provides:      php(pdo_mysql)
 Obsoletes:     php-pdo-mysql < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_MYSQL
 
@@ -1362,6 +1393,7 @@ URL:              http://php.net/manual/en/ref.pdo-oci.php
 %{?requires_php_extension}
 %{?requires_php_pdo_module}
 Provides:      php(pdo-oci)
+Provides:      php(pdo_oci)
 Obsoletes:     php-pdo-oci < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_OCI
 
@@ -1381,6 +1413,7 @@ URL:              http://php.net/manual/en/ref.pdo-odbc.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-odbc)
+Provides:      php(pdo_odbc)
 Obsoletes:     php-pdo-odbc < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_ODBC
 
@@ -1400,7 +1433,7 @@ URL:              http://php.net/manual/en/ref.pdo-pgsql.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-pgsql)
-Provides:      php-pecl-PDO_PGSQL
+Provides:      php(pdo_pgsql)
 Obsoletes:     php-pdo-pgsql < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_PGSQL < 4:5.2.1-2
 
@@ -1420,6 +1453,7 @@ URL:              http://php.net/manual/en/ref.pdo-sqlite.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 Provides:      php(pdo-sqlite)
+Provides:      php(pdo_sqlite)
 Obsoletes:     php-pdo-sqlite < 4:5.3.28-7
 Obsoletes:     php-pecl-PDO_SQLITE
 
@@ -1458,7 +1492,7 @@ URL:              http://php.net/manual/en/book.phar.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-hash = %{epoch}:%{version}-%{release}
 Requires:      %{name}-spl = %{epoch}:%{version}-%{release}
-Requires:      alternatives
+%{?with_alternatives:Requires: alternatives}
 Suggests:      %{name}-cli
 # zlib is required by phar program, but as phar cli is optional should the dep be too
 Suggests:      %{name}-zlib
@@ -1744,6 +1778,9 @@ Summary(pl.UTF-8):        Zawiera pliki testów jednostkowych dla PHP i rozszerzeń
 Group:         Libraries
 URL:           http://qa.php.net/
 Requires:      %{name}-cli
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description tests
 This package contains unit tests for PHP and its extensions.
@@ -1889,7 +1926,7 @@ Group:            Libraries
 URL:           http://php.net/manual/en/book.xsl.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-dom = %{epoch}:%{version}-%{release}
-Requires:      libxslt >= 1.0.18
+Requires:      libxslt >= 1.1.0
 Provides:      php(xsl)
 Obsoletes:     php-xsl < 4:5.3.28-7
 # actually not true, functionality is similar, but API differs
@@ -1941,7 +1978,7 @@ Moduł PHP umożliwiający używanie kompresji zlib.
 cp -p php.ini-production php.ini
 %patch0 -p1
 %patch1 -p1
-#%patch2 -p1 NEEDS PORTING
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
@@ -1965,35 +2002,13 @@ cp -p php.ini-production php.ini
 %if "%{pld_release}" != "ac"
 %patch34 -p1
 %endif
-#%patch36 -p1
-#%patch37 -p1
-#%patch38 -p1
 %patch39 -p1
-%if %{with fpm}
-%if 0
-# create split php-fpm.conf patch. review (restore other diffs) and commit
-cp sapi/fpm/php-fpm.conf.in{,.orig}
-%{__sed} -n -e '/; Start a new pool named/,$p' sapi/fpm/php-fpm.conf.in > sapi/fpm/php-fpm.conf-d.in
-%{__sed} -i -e '/; Include one or more files/,/include=etc\/fpm\.d/d' sapi/fpm/php-fpm.conf.in
-%{__sed} -i -e '/; Start a new pool named/,$d' sapi/fpm/php-fpm.conf.in
-set +e
-cd ..
-diff -u %{orgname}-%{version}/sapi/fpm/php-fpm.conf.in{.orig,} > %{PATCH69}
-diff -u /dev/null %{orgname}-%{version}/sapi/fpm/php-fpm.conf-d.in >> %{PATCH69}
-exit 1
-%else
-#%patch69 -p1
-%endif
 %patch41 -p1
 %patch42 -p1
-%endif
 %patch43 -p1
 %patch44 -p1
 #%patch45 -p1 # imap annotations. fixme
 #%patch46 -p1 # imap myrights. fixme
-%if %{with suhosin}
-%patch47 -p1
-%endif
 %patch50 -p1
 %patch51 -p1
 %patch52 -p1
@@ -2047,22 +2062,22 @@ sed -i -e 's#-fvisibility=hidden##g' configure*
 
 # disable broken tests
 # says just "Terminated" twice and fails
-mv sapi/cli/tests/022.phpt{,.broken}
+%{__mv} sapi/cli/tests/022.phpt{,.broken}
 
 # really dumb test, executable binary name is .libs/ something when building
 # https://bugs.php.net/bug.php?id=54514
-mv tests/basic/bug54514.phpt{,.disable}
+%{__mv} tests/basic/bug54514.phpt{,.disable}
 
 # breaks whole testsuite unexpectedly:
 # Fatal error: Call to undefined function gzencode() in run-tests.php on line 1714
 # probably broken as zlib is built as shared
-mv ext/soap/tests/server019.phpt{,disable}
+%{__mv} ext/soap/tests/server019.phpt{,disable}
 # Fatal error: Call to undefined function gzcompress() in run-tests.php on line 1728
-mv ext/soap/tests/server020.phpt{,disable}
+%{__mv} ext/soap/tests/server020.phpt{,disable}
 
 # runs out of memory and kills carme vserver
 # PASS Bug #39438 (Fatal error: Out of memory) [Zend/tests/bug39438.phpt]
-mv Zend/tests/bug39438.phpt{,.disable}
+%{__mv} Zend/tests/bug39438.phpt{,.disable}
 
 # php-5.3.3/ext/standard/tests/file/statpage.phpt
 %{__rm} ext/standard/tests/file/statpage.phpt
@@ -2150,8 +2165,8 @@ 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
+ver=$(awk '/#define PHP_SQLITE3_VERSION/ {print $3}' ext/sqlite3/php_sqlite3.h | xargs)
+if test "$ver" != "PHP_VERSION"; then
        : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}.
        : Update the sqlite3ver macro and rebuild.
        exit 1
@@ -2180,10 +2195,8 @@ if test "$ver" != "%{bz2ver}"; then
        : Update the bz2ver macro and rebuild.
        exit 1
 fi
-ver=$(sed -n '/#define PHP_ENCHANT_VERSION /{s/.* "//;s/".*$//;p}' ext/enchant/php_enchant.h)
-if test "$ver" != "%{enchantver}"; then
-       : Error: Upstream Enchant version is now ${ver}, expecting %{enchantver}.
-       : Update the enchantver macro and rebuild.
+ver=$(awk '/#define PHP_ENCHANT_VERSION/ {print $3}' ext/enchant/php_enchant.h | xargs)
+if test "$ver" != "PHP_VERSION"; then
        exit 1
 fi
 ver=$(awk '/#define PHP_HASH_VERSION/ {print $3}' ext/hash/php_hash.h | xargs)
@@ -2213,6 +2226,10 @@ fi
 export PROG_SENDMAIL="/usr/lib/sendmail"
 export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} \
        -I%{_includedir}/xmlrpc-epi"
+%if %{with intl}
+# icu 59+ C++ API requires C++ >= 11
+CXXFLAGS="%{rpmcxxflags} -std=c++11"
+%endif
 
 sapis="
 cli
@@ -2285,7 +2302,7 @@ for sapi in $sapis; do
        --with-config-file-path=%{_sysconfdir} \
        --with-config-file-scan-dir=%{_sysconfdir}/conf.d \
        --with-system-tzdata \
-       --%{!?debug:dis}%{?debug:en}able-debug \
+       --%{!?with_debug:dis}%{?with_debug:en}able-debug \
        %{?with_zts:--enable-maintainer-zts} \
        --enable-inline-optimization \
        %{__enable_disable bcmath bcmath shared} \
@@ -2464,6 +2481,8 @@ generate_inifiles() {
                [ "$mod" = "spl" ] && conf="SPL.ini"
                # session needs to be loaded before php-pecl-http, php-pecl-memcache, php-pecl-session_mysql
                [ "$mod" = "session" ] && conf="Session.ini"
+               # hash needs to be loaded before mysqlnd
+               [ "$mod" = "hash" ] && conf="Hash.ini"
                # mysqlnd needs to be loaded before mysqli,pdo_mysqli
                [ "$mod" = "mysqlnd" ] && conf="MySQLND.ini"
                echo "+ $conf"
@@ -2537,13 +2556,17 @@ cp -pf Makefile.cli Makefile
        phpbuilddir=%{_libdir}/%{name}/build \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
+%if %{without default_php}
 # version the .phar files
-mv $RPM_BUILD_ROOT%{_bindir}/phar{,%{ver_suffix}}.phar
-mv $RPM_BUILD_ROOT%{_mandir}/man1/phar{,%{ver_suffix}}.1
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/phar{,%{php_suffix}}.phar
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/phar{,%{php_suffix}}.1
+%endif
+%if %{with alternatives}
 # touch for ghost
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/phar
 touch $RPM_BUILD_ROOT%{_bindir}/phar
 touch $RPM_BUILD_ROOT%{_mandir}/man1/phar.1
+%endif
 
 # version suffix
 v=$(echo %{version} | cut -d. -f1-2)
@@ -2551,7 +2574,7 @@ v=$(echo %{version} | cut -d. -f1-2)
 # install Apache2 DSO module
 %if %{with apache2}
 libtool --mode=install install -p sapi/apache2handler/libphp7.la $RPM_BUILD_ROOT%{_libdir}/apache
-mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp7{,-$v}.so
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp7{,-$v}.so
 ln -s libphp7-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so
 %endif
 
@@ -2565,9 +2588,11 @@ libtool --mode=install install -p sapi/litespeed/php $RPM_BUILD_ROOT%{_sbindir}/
        INSTALL="libtool --mode=install install -p" \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
+%if %{without default_php}
 # version the phpdbg files
-mv $RPM_BUILD_ROOT%{_bindir}/phpdbg{,%{ver_suffix}}
-mv $RPM_BUILD_ROOT%{_mandir}/man1/phpdbg{,%{ver_suffix}}.1
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/phpdbg{,%{ver_suffix}}
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/phpdbg{,%{ver_suffix}}.1
+%endif
 %endif
 
 %if %{with milter}
@@ -2600,6 +2625,11 @@ cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
 %{__sed} -i -e '/su/d' $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
 %endif
 
+%if %{with alternatives}
+# touch for ghost for alternatives
+touch $RPM_BUILD_ROOT%{_sbindir}/php-fpm
+%endif
+
 %{__sed} -i -e '
        s#/usr/lib/php#%{php_extensiondir}#
        s#/etc/php/#%{_sysconfdir}/#
@@ -2646,7 +2676,7 @@ cp -p conf.d/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d
 
 # for CLI SAPI only
-mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d}
+%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d}
 
 # use system automake and {lib,sh}tool
 ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build
@@ -2697,11 +2727,17 @@ fi
 %post fpm
 /sbin/chkconfig --add %{name}-fpm
 %service %{name}-fpm restart
+%if %{with alternatives}
+update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{ver_suffix}-fpm %{ver_suffix} || :
+%endif
 
 %preun fpm
 if [ "$1" = "0" ]; then
        %service %{name}-fpm stop
        /sbin/chkconfig --del %{name}-fpm
+%if %{with alternatives}
+       update-alternatives --remove php-fpm %{_sbindir}/php-fpm || :
+%endif
 fi
 
 %postun fpm
@@ -2712,7 +2748,7 @@ fi
 %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=
@@ -2722,7 +2758,6 @@ if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/s
        fi
 fi
 
-%posttrans common
 # minimizing apache restarts logics. we restart webserver:
 #
 # 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
@@ -2858,23 +2893,30 @@ fi \
 
 %post phar
 %ext_post
+%if %{with alternatives}
 update-alternatives \
        --install %{_bindir}/phar phar %{_bindir}/phar%{ver_suffix}.phar %{ver_suffix} \
        --slave %{_mandir}/man1/phar.1 phar.1 %{_mandir}/man1/phar%{ver_suffix}.1* || :
+%endif
 
 %postun phar
 %ext_postun
+%if %{with alternatives}
 if [ $1 -eq 0 ]; then
        update-alternatives --remove phar %{_bindir}/phar || :
 fi
+%endif
 
 %if %{with apache2}
 %files -n apache-mod_%{name}
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/conf.d/*_mod_php.conf
+%attr(755,root,root) %{_libdir}/apache/mod_php.so
+
+%files -n apache-mod_%{name}-core
+%defattr(644,root,root,755)
 %dir %{_sysconfdir}/apache2handler.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
-%attr(755,root,root) %{_libdir}/apache/mod_php.so
 %attr(755,root,root) %{_libdir}/apache/libphp7-*.*.so
 %endif
 
@@ -2919,6 +2961,9 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.d/www.conf
 %attr(755,root,root) %{_sbindir}/%{name}-fpm
+%if %{with alternatives}
+%ghost %{_sbindir}/php-fpm
+%endif
 %{_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
@@ -2927,8 +2972,8 @@ fi
 %if %{with phpdbg}
 %files phpdbg
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/phpdbg%{ver_suffix}
-%{_mandir}/man1/phpdbg%{ver_suffix}.1*
+%attr(755,root,root) %{_bindir}/phpdbg%{php_suffix}
+%{_mandir}/man1/phpdbg%{php_suffix}.1*
 %endif
 
 %if %{with milter}
@@ -2939,7 +2984,7 @@ fi
 
 %files common
 %defattr(644,root,root,755)
-%doc CREDITS EXTENSIONS LICENSE NEWS README.namespaces UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-*
+%doc CREDITS EXTENSIONS LICENSE NEWS README.namespaces UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-* .gdbinit
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
@@ -3084,7 +3129,7 @@ fi
 %files hash
 %defattr(644,root,root,755)
 %doc ext/hash/{CREDITS,README}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/hash.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/Hash.ini
 %attr(755,root,root) %{php_extensiondir}/hash.so
 %endif
 
@@ -3294,11 +3339,15 @@ fi
 %doc ext/phar/{CREDITS,TODO}
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/phar.ini
 %attr(755,root,root) %{php_extensiondir}/phar.so
-%attr(755,root,root) %{_bindir}/phar%{ver_suffix}.phar
-%{_mandir}/man1/phar.phar.1
-%{_mandir}/man1/phar%{ver_suffix}.1*
+%attr(755,root,root) %{_bindir}/phar%{php_suffix}.phar
+%{_mandir}/man1/phar%{php_suffix}.1*
+%{_mandir}/man1/phar.phar.1*
+%if %{with alternatives}
 %ghost %{_bindir}/phar
 %ghost %{_mandir}/man1/phar.1
+%else
+%attr(755,root,root) %{_bindir}/phar
+%endif
 %endif
 
 %if %{with posix}
This page took 0.076308 seconds and 4 git commands to generate.