X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=php.spec;h=5ac19d5ca5513b353dbf64547cd850ddae7db408;hp=8c1d2f29149d7347eb29e925691603a293239d49;hb=95aa0e1;hpb=abee437ff87b37a720f5acd68348a53e801b1928 diff --git a/php.spec b/php.spec index 8c1d2f2..5ac19d5 100644 --- a/php.spec +++ b/php.spec @@ -28,10 +28,13 @@ # Conditional build: %bcond_with fdf # with FDF (PDF forms) module (BR: proprietary lib) %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 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: https://bugs.php.net/bug.php?id=60100) %bcond_with gd_jis_conv # causes imagettfbbox(): any2eucjp(): invalid code in input string when internal gd used %bcond_with zend_multibyte # enable zend multibyte, mbstring can't be shared then anymore +%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 imap # without IMAP extension module @@ -59,7 +62,7 @@ %bcond_without apache1 # disable building Apache 1.3.x module %bcond_without apache2 # disable building Apache 2.x module %bcond_without fcgi # disable building FCGI SAPI -%bcond_without zts # disable Zend Thread Safety +%bcond_with zts # disable Zend Thread Safety %bcond_without fpm # fpm patches from http://www.php-fpm.org/ %bcond_without suhosin # with suhosin patch %bcond_with system_xmlrpc_epi # use system xmlrpc-epi library (broken on 64bit arches, see http://bugs.php.net/41611) @@ -74,7 +77,7 @@ %undefine with_mm %endif -%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha ppc +%ifnarch %{ix86} %{x8664} x32 sparc sparcv9 alpha ppc %undefine with_interbase %endif %if "%{pld_release}" == "th" @@ -84,7 +87,7 @@ %endif %endif -%ifnarch %{ix86} %{x8664} +%ifnarch %{ix86} %{x8664} x32 # unsupported, see sapi/cgi/fpm/fpm_atomic.h %undefine with_fpm %endif @@ -100,96 +103,135 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %if "%{pld_release}" == "ac" %define magic_mime /usr/share/file/magic.mime +%define _noautoreqdep libphp_common.* +# if commandline --with was given. respect that +%if 0%{!?_with_default_php:1} +%undefine with_default_php +%endif %else %define magic_mime /usr/share/misc/magic.mime %endif +%define rel 12 +%define orgname php +%define ver_suffix 52 +%define php_suffix %{!?with_default_php:%{ver_suffix}} +%define backport_date 20130717 Summary: PHP: Hypertext Preprocessor Summary(fr.UTF-8): Le langage de script embarque-HTML PHP Summary(pl.UTF-8): Język skryptowy PHP 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: php -Version: 5.2.15 -Release: 1 +Name: %{orgname}%{php_suffix} +Version: 5.2.17 +Release: %{backport_date}.%{rel} Epoch: 4 -License: PHP -Group: Libraries -Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2 -# Source0-md5: d4ccad187b12835024980a0cea362893 -Source2: %{name}-mod_%{name}.conf -Source3: %{name}-cgi-fcgi.ini -Source4: %{name}-cgi.ini -Source5: %{name}-apache.ini -Source6: %{name}-cli.ini -# Taken from: http://browsers.garykeith.com/downloads.asp -Source8: %{name}_browscap.ini +# 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: b27947f3045220faf16e4d9158cbfe13 +Source2: %{orgname}-mod_%{orgname}.conf +Source3: %{orgname}-cgi-fcgi.ini +Source4: %{orgname}-cgi.ini +Source5: %{orgname}-apache.ini +Source6: %{orgname}-cli.ini # lynx -dump ftp://distfiles.gentoo.org/pub/gentoo/distfiles/|grep -o ftp://.*php-patchset.*tar.bz2 -#Source9: ftp://distfiles.gentoo.org/pub/gentoo/distfiles/%{name}-patchset-%{version}-r1.tar.bz2 +#Source9: ftp://distfiles.gentoo.org/pub/gentoo/distfiles/%{orgname}-patchset-%{version}-r1.tar.bz2 ## Source9-md5: d67f23f5e69664e06fce89b064d5bbab -Source10: %{name}-fpm.init -Source11: %{name}-fpm.logrotate -Source12: %{name}-branch.sh +Source10: %{orgname}-fpm.init +Source11: %{orgname}-fpm.logrotate +Source12: %{orgname}-branch.sh Source13: dep-tests.sh Source14: skip-tests.sh -Patch0: %{name}-shared.patch -Patch1: %{name}-pldlogo.patch -Patch2: %{name}-mail.patch -Patch3: %{name}-link-libs.patch -Patch4: %{name}-libpq_fs_h_path.patch -Patch5: %{name}-filter-shared.patch -Patch6: %{name}-build_modules.patch -Patch7: %{name}-sapi-ini-file.patch -Patch8: %{name}-no-metaccld.patch -Patch9: %{name}-sh.patch -Patch10: %{name}-ini.patch -Patch11: %{name}-acam.patch -Patch12: %{name}-threads-acfix.patch -Patch13: %{name}-tsrmlsfetchgcc2.patch -Patch14: %{name}-no_pear_install.patch -Patch15: %{name}-zlib.patch -Patch16: %{name}-sybase-fix.patch -Patch17: %{name}-readline.patch -Patch18: %{name}-nohttpd.patch -Patch19: %{name}-gd_imagerotate_enable.patch -Patch20: %{name}-uint32_t.patch -Patch21: %{name}-dba-link.patch -Patch22: %{name}-both-apxs.patch -Patch23: %{name}-builddir.patch -Patch24: %{name}-zlib-for-getimagesize.patch -Patch25: %{name}-versioning.patch -Patch26: %{name}-pear.patch -Patch27: %{name}-config-dir.patch -Patch28: %{name}-bug-42952.patch -Patch29: %{name}-fcgi-graceful.patch -Patch30: %{name}-apr-apu.patch -Patch31: %{name}-fcgi-error_log-no-newlines.patch -Patch32: %{name}-curl-limit-speed.patch -Patch33: %{name}-mime_magic.patch -Patch34: %{name}-libtool.patch -Patch35: %{name}-tds.patch -Patch36: %{name}-mysql-charsetphpini.patch -Patch37: %{name}-mysqli-charsetphpini.patch -Patch38: %{name}-pdo_mysql-charsetphpini.patch -Patch39: %{name}-use-prog_sendmail.patch -Patch40: %{name}-fpm.patch -Patch41: %{name}-fpm-config.patch -Patch42: %{name}-fpm-initdir.patch -Patch43: %{name}-silent-session-cleanup.patch -Patch44: %{name}-include_path.patch -Patch45: %{name}-imap-annotations.patch -Patch46: %{name}-imap-myrights.patch +Patch100: https://php52-backports.googlecode.com/files/php52-backports-%{backport_date}.patch +# Patch100-md5: 80014a8f7894d4e893a8b1292b8b3032 +Patch0: %{orgname}-shared.patch +Patch1: %{orgname}-pldlogo.patch +Patch2: %{orgname}-mail.patch +Patch3: %{orgname}-link-libs.patch +Patch4: %{orgname}-libpq_fs_h_path.patch +Patch5: %{orgname}-filter-shared.patch +Patch6: %{orgname}-build_modules.patch +Patch7: %{orgname}-sapi-ini-file.patch +Patch8: %{orgname}-no-metaccld.patch +Patch9: %{orgname}-sh.patch +Patch10: %{orgname}-ini.patch +Patch11: %{orgname}-acam.patch +Patch12: %{orgname}-threads-acfix.patch +Patch13: %{orgname}-tsrmlsfetchgcc2.patch +Patch14: %{orgname}-no_pear_install.patch +Patch15: %{orgname}-zlib.patch +Patch16: %{orgname}-sybase-fix.patch +Patch17: %{orgname}-readline.patch +Patch18: %{orgname}-nohttpd.patch +Patch19: %{orgname}-gd_imagerotate_enable.patch +Patch20: %{orgname}-uint32_t.patch +Patch21: %{orgname}-dba-link.patch +Patch22: %{orgname}-both-apxs.patch +Patch23: %{orgname}-builddir.patch +Patch24: %{orgname}-zlib-for-getimagesize.patch +Patch25: %{orgname}-versioning.patch +Patch26: %{orgname}-pear.patch +Patch27: %{orgname}-config-dir.patch +Patch28: %{orgname}-bug-42952.patch +Patch29: %{orgname}-fcgi-graceful.patch +Patch30: %{orgname}-apr-apu.patch +Patch31: %{orgname}-fcgi-error_log-no-newlines.patch +Patch32: %{orgname}-curl-limit-speed.patch +Patch33: %{orgname}-mime_magic.patch +Patch34: %{orgname}-libtool.patch +Patch35: %{orgname}-tds.patch +Patch36: %{orgname}-mysql-charsetphpini.patch +Patch37: %{orgname}-mysqli-charsetphpini.patch +Patch38: %{orgname}-pdo_mysql-charsetphpini.patch +Patch39: %{orgname}-use-prog_sendmail.patch +Patch40: %{orgname}-fpm.patch +Patch41: %{orgname}-fpm-config.patch +Patch42: %{orgname}-fpm-initdir.patch +Patch43: %{orgname}-silent-session-cleanup.patch +Patch44: %{orgname}-include_path.patch +Patch45: %{orgname}-imap-annotations.patch +Patch46: %{orgname}-imap-myrights.patch Patch47: suhosin.patch -Patch49: %{name}-m4-divert.patch +Patch49: %{orgname}-m4-divert.patch Patch50: extension-shared-optional-dep.patch Patch51: spl-shared.patch -Patch52: %{name}-libpng.patch -Patch53: %{name}-gmp.patch +Patch52: %{orgname}-libpng.patch +Patch53: %{orgname}-gmp.patch Patch54: fix-test-run.patch -Patch55: %{name}-krb5.patch -Patch56: php-php_dl.patch -URL: http://www.php.net/ +Patch55: bug-52078-fileinode.patch +Patch56: %{orgname}-krb5.patch +Patch57: php-php_dl.patch +Patch58: php-svn-281516.patch +Patch59: %{orgname}-systzdata.patch +Patch60: bug-60986.patch +# http://spot.fedorapeople.org/php-5.3.6-libzip.patch +Patch65: system-libzip.patch +Patch66: bug-47930.patch +Patch67: php-db.patch +Patch69: bug-50563.patch +Patch70: php-crypt-null.patch +Patch71: php-apache24.patch +Patch72: exif-crash-bug-36.patch +Patch73: CVE-2013-6420.patch +Patch74: CVE-2013-4073.patch +Patch75: php-secbug-67498.patch +Patch76: CVE-2015-0232.patch +Patch77: x32.patch +# CENTALT patches +# Backport from 5.3.6 +Patch311: php-5.3.6-bug-47435.patch +Patch314: php-5.3.6-39199.patch +# 5.3.7 +#Patch333: php-5.3.7-bug-54924.patch +Patch355: php-5.3.7-bug-55323.patch +# Bug-323016 CVE-2012-0831 +Patch402: php-5.2.17-bug-323016.patch +URL: https://code.google.com/p/php52-backports/ %{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}} %{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0} BuildRequires: autoconf >= 2.53 @@ -208,6 +250,7 @@ BuildRequires: elfutils-devel BuildRequires: flex %if %{with mssql} || %{with sybase} || %{with sybase_ct} BuildRequires: freetds-devel +%{?with_system_libzip:BuildRequires: libzip-devel >= 0.10-3} %endif BuildRequires: freetype-devel >= 2.0 %if %{with system_gd} @@ -231,17 +274,18 @@ BuildRequires: libwrap-devel BuildRequires: libxml2-devel >= 1:2.7.6-4 BuildRequires: libxslt-devel >= 1.1.0 %{?with_mhash:BuildRequires: mhash-devel} +%{?with_snmp:%{?with_tests:BuildRequires: mibs-net-snmp}} %{?with_ming:BuildRequires: ming-devel >= 0.3} %{?with_mm:BuildRequires: mm-devel >= 1.3.0} BuildRequires: mysql-devel >= 4.0.0 %{?with_mysqli:BuildRequires: mysql-devel >= 4.1} BuildRequires: ncurses-ext-devel +%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7} %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} %if %{with openssl} || %{with ldap} BuildRequires: openssl-devel >= 0.9.7d %endif -%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7} -%{?with_snmp:%{?with_tests:mibs-net-snmp}} +%{?with_oci:%{?with_instantclient:BuildRequires: oracle-instantclient-devel}} BuildRequires: pam-devel %{?with_pcre:BuildRequires: pcre-devel >= 6.6} BuildRequires: pkgconfig @@ -272,8 +316,8 @@ BuildRequires: libevent-devel >= 1.4.7-3 %endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define php_sysconfdir /etc/php -%define php_extensiondir %{_libdir}/php +%define php_sysconfdir /etc/%{name} +%define php_extensiondir %{_libdir}/%{name} %define _sysconfdir %{php_sysconfdir} # must be in sync with source. extra check ensuring that it is so is done in %%build @@ -283,7 +327,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define zend_zts %{!?with_zts:0}%{?with_zts:1} %define php_debug %{!?debug:0}%{?debug:1} -%if %{with oci8} +%if %{with oci} # ORACLE_HOME is required for oci8 ext to build %define _preserve_env %_preserve_env_base ORACLE_HOME %endif @@ -341,7 +385,7 @@ PHP - це мова написання скриптів, що вбудовуют роботи з базами даних є доволі простим. Найбільш популярне використання PHP - заміна для CGI скриптів. -%package -n apache1-mod_php +%package -n apache1-mod_%{name} 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 @@ -353,13 +397,13 @@ Provides: webserver(php) = %{version} Obsoletes: apache-mod_php < 1:4.1.1 Obsoletes: phpfi -%description -n apache1-mod_php +%description -n apache1-mod_%{name} PHP as DSO module for Apache 1.3.x. -%description -n apache1-mod_php -l pl.UTF-8 +%description -n apache1-mod_%{name} -l pl.UTF-8 PHP jako moduł DSO (Dynamic Shared Object) dla Apache 1.3.x. -%package -n apache-mod_php +%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 Group: Development/Languages/PHP @@ -369,10 +413,10 @@ Requires: apache-mod_mime Provides: webserver(php) = %{version} Obsoletes: phpfi -%description -n apache-mod_php +%description -n apache-mod_%{name} PHP as DSO module for Apache 2.x. -%description -n apache-mod_php -l pl.UTF-8 +%description -n apache-mod_%{name} -l pl.UTF-8 PHP jako moduł DSO (Dynamic Shared Object) dla Apache 2.x. %package fcgi @@ -396,6 +440,9 @@ Group: Development/Languages/PHP Requires: %{name}-common = %{epoch}:%{version}-%{release} Provides: php(cgi) Provides: webserver(php) = %{version} +%if "%{pld_release}" != "ac" +Conflicts: logrotate < 3.8.0 +%endif %description cgi php as CGI program. @@ -430,6 +477,7 @@ 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 Group: Development/Languages/PHP URL: http://www.php-fpm.org/ Requires(post,preun): /sbin/chkconfig @@ -445,6 +493,9 @@ Provides: webserver(php) = %{version} %description fpm PHP FastCGI Process Manager. +%description fpm -l pl.UTF-8 +PHP FastCGI Process Manager - zarządca procesów FastCGI. + %package common Summary: Common files needed by both Apache modules and CGI/CLI SAPI-s Summary(pl.UTF-8): Wspólne pliki dla modułu Apache'a i programu CGI @@ -453,8 +504,22 @@ Summary(uk.UTF-8): Бібліотеки спільного використан Group: Libraries # 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 +Provides: %{name}(debug) = %{php_debug} +Provides: %{name}(modules_api) = %{php_api_version} +Provides: %{name}(thread-safety) = %{zend_zts} +Provides: %{name}(zend_extension_api) = %{zend_extension_api} +Provides: %{name}(zend_module_api) = %{zend_module_api} +Provides: %{name}-core +Provides: %{name}-date +Provides: %{name}-ereg +%{?with_zend_multibyte:Provides: %{name}-mbstring = %{epoch}:%{version}-%{release}} +Provides: %{name}-overload +Provides: %{name}-reflection +Provides: %{name}-standard +Provides: php(core) = %{version} Provides: php(date) Provides: php(ereg) Provides: php(libxml) @@ -463,16 +528,6 @@ Provides: php(modules_api) = %{php_api_version} Provides: php(overload) Provides: php(reflection) Provides: php(standard) -Provides: php(zend_extension_api) = %{zend_extension_api} -Provides: php(zend_module_api) = %{zend_module_api} -Provides: php-date -Provides: php-ereg -%{?with_zend_multibyte:Provides: php-mbstring = %{epoch}:%{version}-%{release}} -Provides: php-overload -Provides: php-reflection -Provides: php-standard -Provides: php5(debug) = %{php_debug} -Provides: php5(thread-safety) = %{zend_zts} # ensure backward compatibility for Titanium # to be dropped in future but ask Titanium RM before doing so %if "%{pld_release}" == "ti" @@ -485,6 +540,9 @@ Requires: %{name}-pcre = %{epoch}:%{version}-%{release} Requires: %{name}-session = %{epoch}:%{version}-%{release} Requires: %{name}-spl = %{epoch}:%{version}-%{release} %endif +%{!?with_mysqlnd:Obsoletes: php-mysqlnd} +%{?with_pcre:%requires_ge_to pcre pcre-devel} +Suggests: browscap Obsoletes: php-pecl-domxml Conflicts: php-pecl-memcache < 3.0.4-2 Conflicts: php4-common < 3:4.4.4-8 @@ -521,8 +579,14 @@ Requires: libtool %endif %{?with_pcre:Requires: pcre-devel >= 6.6} Requires: shtool +Obsoletes: php-devel Obsoletes: php-pear-devel Obsoletes: php4-devel +Obsoletes: php53-devel +Obsoletes: php54-devel +Obsoletes: php55-devel +Obsoletes: php56-devel +Obsoletes: php70-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -579,9 +643,9 @@ Summary(pl.UTF-8): Moduł bzip2 dla PHP Group: Libraries URL: http://www.php.net/manual/en/book.bzip2.php Requires: %{name}-common = %{epoch}:%{version}-%{release} +Provides: %{name}-bzip2 = %{epoch}:%{version}-%{release} Provides: php(bz2) Provides: php(bzip2) -Provides: php-bzip2 = %{epoch}:%{version}-%{release} Obsoletes: php-bzip2 %description bz2 @@ -674,8 +738,8 @@ URL: http://www.php.net/manual/en/book.dom.php Requires: %{name}-common = %{epoch}:%{version}-%{release} Provides: php(dom) # it has some compatibility functions +Provides: %{name}-domxml = %{epoch}:%{version}-%{release} Provides: php(domxml) -Provides: php-domxml = %{epoch}:%{version}-%{release} Obsoletes: php-domxml <= 3:4.3.8-1 %description dom @@ -1372,6 +1436,7 @@ Summary(pl.UTF-8): Moduł session dla PHP Group: Libraries Requires: %{name}-common = %{epoch}:%{version}-%{release} Suggests: %{name}-hash = %{epoch}:%{version}-%{release} +Suggests: tmpwatch Provides: php(session) %description session @@ -1750,6 +1815,7 @@ Summary(pl.UTF-8): Zarządzanie archiwami zip Group: Libraries URL: http://www.php.net/manual/en/book.zip.php Requires: %{name}-common = %{epoch}:%{version}-%{release} +%{?with_system_libzip:Requires: libzip >= 0.10-3} Provides: php(zip) Obsoletes: php-pecl-zip @@ -1776,7 +1842,8 @@ compression support to PHP. Moduł PHP umożliwiający używanie kompresji zlib. %prep -%setup -q +%setup -q -n %{orgname}-%{version} +%patch100 -p1 # for suhosin patch %{__sed} -i -e 's,\r$,,' Zend/Zend.dsp Zend/ZendTS.dsp @@ -1864,6 +1931,31 @@ done %patch54 -p1 %patch55 -p1 %patch56 -p1 +%patch57 -p1 +%patch58 -p4 +%patch59 -p1 +%patch60 -p4 +%{?with_system_libzip:%patch65 -p1} +%patch66 -p2 +%patch67 -p1 +%patch69 -p4 +%patch70 -p1 +%patch71 -p1 +%patch72 -p1 +%patch73 -p1 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 +%patch77 -p1 + +# Bugfix backport from 5.3.6 +%patch311 -p1 -b .bug-47435 +%patch314 -p1 -b .bug-39199 +# Bugfix backport from 5.3.7 +#accert %patch333 -p1 -b .bug-54924 +#soap %patch355 -p1 -b .bug-55323 +# causes regression -> magic_quotes_gpc setting cannot be changed +#%%patch402 -p1 -b .bug-323016 # conflict seems to be resolved by recode patches rm -f ext/recode/config9.m4 @@ -1965,16 +2057,17 @@ for sapi in $sapis; do sapi_args='--disable-cli --enable-fastcgi --enable-force-cgi-redirect --enable-fpm' ;; apxs1) - ver=$(rpm -q --qf '%{V}' apache1-devel) - sapi_args="--disable-cli --with-apxs=%{apxs1} --with-apache-version=$ver" + apache_ver=$(rpm -q --qf '%{V}' apache1-devel) + sapi_args="--disable-cli --with-apxs=%{apxs1} --with-apache-version=$apache_ver" ;; apxs2) - ver=$(rpm -q --qf '%{V}' apache-devel) - sapi_args="--disable-cli --with-apxs2=%{apxs2} --with-apache-version=$ver" + apache_ver=$(rpm -q --qf '%{V}' apache-devel) + sapi_args="--disable-cli --with-apxs2=%{apxs2} --with-apache-version=$apache_ver" ;; esac %configure \ + FORCE_APACHE_VERSION="${apache_ver}" \ $sapi_args \ %if "%{!?configure_cache:0}%{?configure_cache}" == "0" --cache-file=config.cache \ @@ -1983,6 +2076,7 @@ for sapi in $sapis; do --with-config-file-path=%{_sysconfdir} \ --with-config-file-scan-dir=%{_sysconfdir}/conf.d \ --with-exec-dir=%{_bindir} \ + --with-system-tzdata \ --%{!?debug:dis}%{?debug:en}able-debug \ %{?with_zts:--enable-maintainer-zts} \ %{?with_suhosin:--enable-suhosin} \ @@ -2008,8 +2102,8 @@ for sapi in $sapis; do --enable-xmlwriter=shared \ %if %{with fpm} --with-fpm-conf=%{_sysconfdir}/fpm.conf \ - --with-fpm-log=/var/log/fpm.log \ - --with-fpm-pid=/var/run/php/fpm.pid \ + --with-fpm-log=/var/log/php/%{name}-fpm.log \ + --with-fpm-pid=/var/run/%{name}-fpm.pid \ %endif %if %{with mssql} || %{with sybase} || %{with sybase_ct} --with-pdo-dblib=shared \ @@ -2018,7 +2112,7 @@ for sapi in $sapis; do --with-pdo-firebird=shared,/usr \ %endif --with-pdo-mysql=shared \ - %{?with_oci8:--with-pdo-oci=shared} \ + %{?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_sqlite:--with-pdo-sqlite=shared,/usr} \ @@ -2066,7 +2160,7 @@ for sapi in $sapis; do --with-mysql-sock=/var/lib/mysql/mysql.sock \ %{?with_mysqli:--with-mysqli=shared} \ --with-ncurses=shared \ - %{?with_oci8:--with-oci8=shared} \ + %{?with_oci:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ %{?with_openssl:--with-openssl=shared} \ --with-kerberos \ %{!?with_pcre:--without-pcre-regex}%{?with_pcre:--with-pcre-regex=shared,/usr} \ @@ -2089,6 +2183,7 @@ for sapi in $sapis; do --with-xsl=shared \ --with-zlib=shared \ --with-zlib-dir=shared,/usr \ + %{?with_system_libzip:--with-libzip} \ --enable-zip=shared,/usr \ cp -f Makefile Makefile.$sapi @@ -2171,7 +2266,10 @@ generate_inifiles PHP=./sapi/cli/php EXTENSION_DIR=modules CONFIG_DIR=conf.d ./dep-tests.sh > dep-tests.log if grep -v OK dep-tests.log; then echo >&2 "The results above were not expected" +# TEMP: ac-i386 builder is broken +%ifnarch i386 exit 1 +%endif fi @@ -2213,57 +2311,74 @@ install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cg $RPM_BUILD_ROOT%{_mandir}/man1 \ # install the Apache modules' files -%{__make} install-headers install-build install-modules install-programs \ +%{__make} -j1 install-headers install-build install-modules install-programs \ + phpbuilddir=%{_libdir}/%{name}/build \ INSTALL_ROOT=$RPM_BUILD_ROOT +# version suffix +v=$(echo %{version} | cut -d. -f1-2) + # install Apache1 DSO module %if %{with apache1} -libtool --silent --mode=install install sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/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 --silent --mode=install install sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache +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 -libtool --silent --mode=install install libphp_common.la $RPM_BUILD_ROOT%{_libdir} -# fix install paths, avoid evil rpaths -sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la -# better solution? -sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/php/build/acinclude.m4 - # install CGI -libtool --silent --mode=install install sapi/cgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/php.cgi +libtool --mode=install install -p sapi/cgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/%{name}.cgi # install FCGI %if %{with fcgi} -libtool --silent --mode=install install sapi/fcgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/php.fcgi +libtool --mode=install install -p sapi/fcgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/%{name}.fcgi %endif # install FCGI PM %if %{with fpm} -libtool --silent --mode=install install sapi/fpm/php-cgi $RPM_BUILD_ROOT%{_bindir}/php.fpm -%{__make} install-fpm -f Makefile.fpm \ - INSTALL_ROOT=$RPM_BUILD_ROOT -install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/php-fpm +install -d $RPM_BUILD_ROOT{%{_sysconfdir}/fpm.d,%{_sbindir}} +libtool --mode=install install -p sapi/fpm/php-cgi $RPM_BUILD_ROOT%{_sbindir}/%{name}-fpm +cp -p sapi/fpm/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir}/fpm.conf +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 -install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/php-fpm +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 -# install CLI -libtool --silent --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli -install sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php.1 -echo ".so php.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.cli.1 +%{__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}/fpm.conf} +%endif -ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php +# install CLI +# without suffix, install as php.cli +%if "%{?php_suffix}" == "" +%define phpfn %{name}.cli +%else +%define phpfn %{name} +%endif +libtool --silent --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/%{phpfn} +ln -sf %{phpfn} $RPM_BUILD_ROOT%{_bindir}/php +cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{phpfn}.1 +echo ".so man1/%{phpfn}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1 +ln -sf %{phpfn} $RPM_BUILD_ROOT%{_bindir}/php -sed -e 's#%{_prefix}/lib/php#%{_libdir}/php#g' php.ini > $RPM_BUILD_ROOT%{_sysconfdir}/php.ini +cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini %if %{with fcgi} install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi-fcgi.ini %endif install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini -install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/browscap.ini %if %{with apache1} install %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf @@ -2280,6 +2395,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d cp -a conf.d/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d +# ensure that paths are correct for current php version and arch +grep -El '/etc/php/|/usr/lib/php/' $RPM_BUILD_ROOT%{_sysconfdir}/*.ini | xargs -r \ +%{__sed} -i -e ' + s#/usr/lib/php#%{php_extensiondir}#g + s#/etc/php#%{_sysconfdir}#g +' + # per SAPI ini directories install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi,cli,cgi-fcgi,apache,apache2handler}.d @@ -2287,17 +2409,20 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi,cli,cgi-fcgi,apache,apache2handler mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/{ncurses,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 # as a result of ext/pcre/pcrelib removal in %%prep, ext/pcre/php_pcre.h # isn't installed by install-headers make target, we do it manually here. @@ -2312,25 +2437,31 @@ install -d $RPM_BUILD_ROOT%{php_data_dir}/tests/php install -p run-tests.php $RPM_BUILD_ROOT%{php_data_dir}/tests/php/run-tests.php cp -a tests/* $RPM_BUILD_ROOT%{php_data_dir}/tests/php +libtool --silent --mode=install install libphp_common.la $RPM_BUILD_ROOT%{_libdir} +# fix install paths, avoid evil rpaths +sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la +# better solution? +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 -%post -n apache1-mod_php +%post -n apache1-mod_%{name} if [ "$1" = "1" ]; then %service -q apache restart fi -%postun -n apache1-mod_php +%postun -n apache1-mod_%{name} if [ "$1" = "0" ]; then %service -q apache restart fi -%post -n apache-mod_php +%post -n apache-mod_%{name} if [ "$1" = "1" ]; then %service -q httpd restart fi -%postun -n apache-mod_php +%postun -n apache-mod_%{name} if [ "$1" = "0" ]; then %service -q httpd restart fi @@ -2339,13 +2470,13 @@ fi %useradd -u 51 -r -s /bin/false -c "HTTP User" -g http http %post fpm -/sbin/chkconfig --add php-fpm -%service php-fpm restart +/sbin/chkconfig --add %{name}-fpm +%service %{name}-fpm restart %preun fpm if [ "$1" = 0 ]; then - %service php-fpm stop - /sbin/chkconfig --del php-fpm + %service %{name}-fpm stop + /sbin/chkconfig --del %{name}-fpm fi %postun fpm @@ -2370,23 +2501,13 @@ 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 -%if %{with apache1} -%triggerpostun -n apache1-mod_php -- php < 4:5.0.4-9.11 -sed -i -e ' - /^AddType application\/x-httpd-php \.php/s,^,#, - /^\(Add\|Load\)Module.*php5\.\(so\|c\)/d -' /etc/apache/apache.conf -%service -q apache restart -%endif - -%if %{with apache2} -%triggerpostun -n apache-mod_php -- php < 4:5.0.4-7.1, php < 4:5.0.4-7.1 -# for fixed php-SAPI.ini, the poor php-apache.ini was never read for apache2 -if [ -f %{_sysconfdir}/php-apache.ini.rpmsave ]; then - cp -f %{_sysconfdir}/php-apache2handler.ini{,.rpmnew} - mv -f %{_sysconfdir}/php-apache.ini.rpmsave %{_sysconfdir}/php-apache2handler.ini +%triggerpostun common -- %{name}-common < 4:5.2.17-20130717.9, php-common < 4:5.2.17-20130717.9 +# 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 -%endif # common macros called at extension post/postun scriptlet %define extension_scripts() \ @@ -2434,9 +2555,12 @@ fi %extension_scripts oci8 %extension_scripts odbc %extension_scripts openssl +%extension_scripts pcntl %extension_scripts pcre +%extension_scripts pdo %extension_scripts pdo-dblib %extension_scripts pdo-firebird +%extension_scripts pdo-oci %extension_scripts pdo-mysql %extension_scripts pdo-odbc %extension_scripts pdo-pgsql @@ -2446,6 +2570,7 @@ fi %extension_scripts pspell %extension_scripts recode %extension_scripts session +%extension_scripts simplexml %extension_scripts shmop %extension_scripts snmp %extension_scripts soap @@ -2468,196 +2593,24 @@ fi %extension_scripts zip %extension_scripts zlib -%triggerun bcmath -- %{name}-bcmath < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*bcmath\.so/d' %{_sysconfdir}/php.ini - -%triggerun calendar -- %{name}-calendar < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*calendar\.so/d' %{_sysconfdir}/php.ini - -%triggerun ctype -- %{name}-ctype < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ctype\.so/d' %{_sysconfdir}/php.ini - -%triggerun curl -- %{name}-curl < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*curl\.so/d' %{_sysconfdir}/php.ini - -%triggerun dba -- %{name}-dba < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*dba\.so/d' %{_sysconfdir}/php.ini - -%triggerun dbase -- %{name}-dbase < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*dbase\.so/d' %{_sysconfdir}/php.ini - -%triggerun dom -- %{name}-dom < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*dom\.so/d' %{_sysconfdir}/php.ini - -%triggerun exif -- %{name}-exif < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*exif\.so/d' %{_sysconfdir}/php.ini - -%triggerun fdf -- %{name}-fdf < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*fdf\.so/d' %{_sysconfdir}/php.ini - -%triggerun ftp -- %{name}-ftp < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ftp\.so/d' %{_sysconfdir}/php.ini - -%triggerun gd -- %{name}-gd < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*gd\.so/d' %{_sysconfdir}/php.ini - -%triggerun gettext -- %{name}-gettext < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*gettext\.so/d' %{_sysconfdir}/php.ini - -%triggerun gmp -- %{name}-gmp < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*gmp\.so/d' %{_sysconfdir}/php.ini - -%triggerun iconv -- %{name}-iconv < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*iconv\.so/d' %{_sysconfdir}/php.ini - -%triggerun imap -- %{name}-imap < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*imap\.so/d' %{_sysconfdir}/php.ini - -%triggerun interbase -- %{name}-interbase < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*interbase\.so/d' %{_sysconfdir}/php.ini - -%triggerun ldap -- %{name}-ldap < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ldap\.so/d' %{_sysconfdir}/php.ini - -%triggerun mbstring -- %{name}-mbstring < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mbstring\.so/d' %{_sysconfdir}/php.ini - -%triggerun mcrypt -- %{name}-mcrypt < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mcrypt\.so/d' %{_sysconfdir}/php.ini - -%triggerun mhash -- %{name}-mhash < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mhash\.so/d' %{_sysconfdir}/php.ini - -%triggerun mime_magic -- %{name}-mime_magic < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mime_magic\.so/d' %{_sysconfdir}/php.ini - -%triggerun ming -- %{name}-ming < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ming\.so/d' %{_sysconfdir}/php.ini - -%triggerun mssql -- %{name}-mssql < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mssql\.so/d' %{_sysconfdir}/php.ini - -%triggerun mysql -- %{name}-mysql < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mysql\.so/d' %{_sysconfdir}/php.ini - -%triggerun ncurses -- %{name}-ncurses < 4:5.1.2-9.5 -if [ -f %{_sysconfdir}/php-cgi.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ncurses\.so/d' %{_sysconfdir}/php-cgi.ini -fi -if [ -f %{_sysconfdir}/php-cli.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ncurses\.so/d' %{_sysconfdir}/php-cli.ini -fi - -%triggerun mysqli -- %{name}-mysqli < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*mysqli\.so/d' %{_sysconfdir}/php.ini - -%triggerun oci8 -- %{name}-oci8 < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*oci8\.so/d' %{_sysconfdir}/php.ini - -%triggerun odbc -- %{name}-odbc < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*odbc\.so/d' %{_sysconfdir}/php.ini - -%triggerun openssl -- %{name}-openssl < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*openssl\.so/d' %{_sysconfdir}/php.ini - -%triggerun pcntl -- %{name}-pcntl < 4:5.1.2-9.5 -if [ -f %{_sysconfdir}/php-cgi.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*pcntl\.so/d' %{_sysconfdir}/php-cgi.ini -fi -if [ -f %{_sysconfdir}/php-cli.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*pcntl\.so/d' %{_sysconfdir}/php-cli.ini -fi - -%triggerun pcre -- %{name}-pcre < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*pcre\.so/d' %{_sysconfdir}/php.ini - -%triggerun pgsql -- %{name}-pgsql < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*pgsql\.so/d' %{_sysconfdir}/php.ini - -%triggerun posix -- %{name}-posix < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*posix\.so/d' %{_sysconfdir}/php.ini - -%triggerun pspell -- %{name}-pspell < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*pspell\.so/d' %{_sysconfdir}/php.ini - -%triggerun readline -- %{name}-readline < 4:5.1.2-9.5 -if [ -f %{_sysconfdir}/php-cgi.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*readline\.so/d' %{_sysconfdir}/php-cgi.ini -fi -if [ -f %{_sysconfdir}/php-cli.ini ]; then - %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*readline\.so/d' %{_sysconfdir}/php-cli.ini -fi - -%triggerun recode -- %{name}-recode < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*recode\.so/d' %{_sysconfdir}/php.ini - -%triggerun session -- %{name}-session < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*session\.so/d' %{_sysconfdir}/php.ini - -%triggerun shmop -- %{name}-shmop < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*shmop\.so/d' %{_sysconfdir}/php.ini - -%triggerun snmp -- %{name}-snmp < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*snmp\.so/d' %{_sysconfdir}/php.ini - -%triggerun soap -- %{name}-soap < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*soap\.so/d' %{_sysconfdir}/php.ini - -%triggerun sockets -- %{name}-sockets < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sockets\.so/d' %{_sysconfdir}/php.ini - -%triggerun sqlite -- %{name}-sqlite < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sqlite\.so/d' %{_sysconfdir}/php.ini - -%triggerun sybase -- %{name}-sybase < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sybase\.so/d' %{_sysconfdir}/php.ini - -%triggerun sybase-ct -- %{name}-sybase-ct < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sybase-ct\.so/d' %{_sysconfdir}/php.ini - -%triggerun sysvmsg -- %{name}-sysvmsg < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sysvmsg\.so/d' %{_sysconfdir}/php.ini - -%triggerun sysvsem -- %{name}-sysvsem < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sysvsem\.so/d' %{_sysconfdir}/php.ini - -%triggerun sysvshm -- %{name}-sysvshm < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*sysvshm\.so/d' %{_sysconfdir}/php.ini - -%triggerun tidy -- %{name}-tidy < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*tidy\.so/d' %{_sysconfdir}/php.ini - -%triggerun wddx -- %{name}-wddx < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*wddx\.so/d' %{_sysconfdir}/php.ini - -%triggerun xml -- %{name}-xml < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*xml\.so/d' %{_sysconfdir}/php.ini - -%triggerun xmlrpc -- %{name}-xmlrpc < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*xmlrpc\.so/d' %{_sysconfdir}/php.ini - -%triggerun xsl -- %{name}-xsl < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*xsl\.so/d' %{_sysconfdir}/php.ini - -%triggerun zlib -- %{name}-zlib < 4:5.0.4-9.1 -%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*zlib\.so/d' %{_sysconfdir}/php.ini - %if %{with apache1} -%files -n apache1-mod_php +%files -n apache1-mod_%{name} %defattr(644,root,root,755) %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/apache/conf.d/*_mod_php.conf %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} -%files -n apache-mod_php +%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 %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 fcgi} @@ -2666,34 +2619,34 @@ fi %doc sapi/cgi/README.FastCGI %dir %{_sysconfdir}/cgi-fcgi.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cgi-fcgi.ini -%attr(755,root,root) %{_bindir}/php.fcgi +%attr(755,root,root) %{_bindir}/%{name}.fcgi %endif %files cgi %defattr(644,root,root,755) %dir %{_sysconfdir}/cgi.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cgi.ini -%attr(755,root,root) %{_bindir}/php.cgi +%attr(755,root,root) %{_bindir}/%{name}.cgi %files cli %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.cli -%{_mandir}/man1/php.1* -%{_mandir}/man1/php.cli.1* +%attr(755,root,root) %{_bindir}/%{phpfn} +%{_mandir}/man1/%{phpfn}.1* %files program %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/php +%{_mandir}/man1/php.1* %if %{with fpm} %files fpm %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpm.conf -%attr(755,root,root) %{_bindir}/php.fpm -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/php-fpm -%attr(754,root,root) /etc/rc.d/init.d/php-fpm +%attr(755,root,root) %{_sbindir}/%{name}-fpm +%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 %endif %files common @@ -2706,7 +2659,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} @@ -2721,7 +2673,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* @@ -2900,7 +2852,7 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cli.d/ncurses.ini %attr(755,root,root) %{php_extensiondir}/ncurses.so -%if %{with oci8} +%if %{with oci} %files oci8 %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/oci8.ini @@ -2957,7 +2909,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) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_oci.ini @@ -3107,6 +3059,15 @@ fi %{php_data_dir}/tests/php/quicktester.inc %attr(755,root,root) %{php_data_dir}/tests/php/run-tests.php +# random junk, didn't check, maybe can be just removed +%{php_data_dir}/tests/php/bin-info.inc +%{php_data_dir}/tests/php/foo* +%{php_data_dir}/tests/php/odbc*.php +%{php_data_dir}/tests/php/recurse +%{php_data_dir}/tests/php/run.* +%{php_data_dir}/tests/php/scan_cases +%{php_data_dir}/tests/php/test* + %if %{with tidy} %files tidy %defattr(644,root,root,755)