# db, hyperwave, java, mcal, overload, qtdom
# and removed from php 5.1:
# cpdf, fam, yp, oracle
+# and removed from php 5.2:
+# filepro, hw
# - mime_magic can't handle new "string/*" entries in magic.mime
# - make additional headers added by mail patch configurable
# - apply -hardened patch by default ?
%bcond_with db3 # use db3 packages instead of db (4.x) for Berkeley DB support
%bcond_with fdf # with FDF (PDF forms) module (BR: proprietary lib)
%bcond_with hardening # build with hardening patch applied (http://www.hardened-php.net/)
-%bcond_with hwapi # with Hw API support (BR: proprietary libs)
%bcond_with interbase_inst # use InterBase install., not Firebird (BR: proprietary libs)
%bcond_with oci8 # with Oracle oci8 extension module (BR: proprietary libs)
%bcond_without curl # without CURL extension module
%bcond_without mhash # without mhash extension module
%bcond_without ming # without ming extension module
%bcond_without mm # without mm support for session storage
-%bcond_without msession # without msession extension module
%bcond_without mssql # without MS SQL extension module
%bcond_without mysqli # without mysqli support (Requires mysql > 4.1)
%bcond_without mime_magic # without mime-magic module
ERROR: You need to select at least one Apache SAPI to build shared modules.
%endif
-# x86-only lib
-%ifnarch %{ix86}
-%undefine with_msession
-%endif
-
-%define _rel 9.14
+%define _rel 0.2
Summary: PHP: Hypertext Preprocessor
Summary(fr): Le langage de script embarque-HTML PHP
Summary(pl): Jêzyk skryptowy PHP
Summary(ru): PHP ÷ÅÒÓÉÉ 5 - ÑÚÙË ÐÒÅÐÒÏÃÅÓÓÉÒÏ×ÁÎÉÑ HTML-ÆÁÊÌÏ×, ×ÙÐÏÌÎÑÅÍÙÊ ÎÁ ÓÅÒ×ÅÒÅ
Summary(uk): PHP ÷ÅÒÓ¦§ 5 - ÍÏ×Á ÐÒÅÐÒÏÃÅÓÕ×ÁÎÎÑ HTML-ÆÁÊ̦×, ×ÉËÏÎÕ×ÁÎÁ ÎÁ ÓÅÒ×ÅÒ¦
Name: php
-Version: 5.1.2
+Version: 5.2.0
Release: %{_rel}%{?with_hardening:hardened}
Epoch: 4
License: PHP
Group: Libraries
Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2
-# Source0-md5: 79cee17e9db85be878000a2a4198378e
-Source1: FAQ.%{name}
+# Source0-md5: e6029fafcee029edcfa2ceed7a005333
+
Source2: zend.gif
Source3: %{name}-mod_%{name}.conf
Source4: %{name}-cgi-fcgi.ini
Patch2: %{name}-mail.patch
Patch3: %{name}-link-libs.patch
Patch4: %{name}-libpq_fs_h_path.patch
-Patch5: %{name}-msession-shared-lib.patch
Patch6: %{name}-build_modules.patch
Patch7: %{name}-sapi-ini-file.patch
Patch8: %{name}-no-metaccld.patch
Patch21: %{name}-nohttpd.patch
Patch23: %{name}-gd_imagerotate_enable.patch
Patch24: %{name}-uint32_t.patch
-Patch25: %{name}-hwapi-link.patch
Patch26: %{name}-dba-link.patch
Patch30: %{name}-hardening-fix.patch
Patch31: %{name}-both-apxs.patch
Patch32: %{name}-builddir.patch
Patch33: %{name}-zlib-for-getimagesize.patch
-Patch34: %{name}-ini-search-path.patch
-# Very big hack that is sane only with non-thread MPMs.
-# The case with threaded MPMs is lost even without this hack.
-# http://bugs.php.net/bug.php?id=36152
-Patch35: %{name}-openssl-huge-hack.patch
-Patch36: %{name}-versioning.patch
-Patch37: %{name}-linkflags-clean.patch
-Patch38: %{name}-CVE-2006-0996.patch
-Patch39: %{name}-CVE-2006-1490.patch
+Patch35: %{name}-versioning.patch
+Patch36: %{name}-linkflags-clean.patch
+Patch38: %{name}-amd64.patch
+Patch39: %{name}-pear.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
BuildRequires: libtool >= 1.4.3
BuildRequires: libwrap-devel
BuildRequires: libxml2-devel >= 2.5.10
-BuildRequires: libxslt-devel >= 1.0.18
+BuildRequires: libxslt-devel >= 1.1.0
%{?with_mhash:BuildRequires: mhash-devel}
-%{?with_ming:BuildRequires: ming-devel >= 0.1.0}
+%{?with_ming:BuildRequires: ming-devel >= 0.2a-11}
%{?with_mm:BuildRequires: mm-devel >= 1.3.0}
BuildRequires: mysql-devel >= 4.0.0
%{?with_mysqli:BuildRequires: mysql-devel >= 4.1.0}
%endif
%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7}
BuildRequires: pam-devel
-%{?with_pcre:BuildRequires: pcre-devel}
-%{?with_msession:BuildRequires: phoenix-devel}
+%{?with_pcre:BuildRequires: pcre-devel >= 6.6}
%{?with_pgsql:BuildRequires: postgresql-backend-devel >= 7.2}
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: readline-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/php
-%define _phpsharedir %{_datadir}/php
%define extensionsdir %{_libdir}/php
# must be in sync with source. extra check ensuring that it is so is done in %%build
%define php_api_version 20041225
-%define zend_module_api 20050922
-%define zend_extension_api 220051025
+%define zend_module_api 20060613
+%define zend_extension_api 220060519
%define zend_zts %{!?with_zts:0}%{?with_zts:1}
%define php_debug %{!?debug:0}%{?debug:1}
Requires: glibc >= 6:2.3.5
Requires: php-dirs
Provides: %{name}-libxml = %{epoch}:%{version}-%{release}
+Provides: %{name}-overload = %{epoch}:%{version}-%{release}
Provides: %{name}-session = %{epoch}:%{version}-%{release}
Provides: %{name}-simplexml = %{epoch}:%{version}-%{release}
Provides: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: %{name}-standard = %{epoch}:%{version}-%{release}
+%{?with_pcre:Provides: %{name}-pcre = %{epoch}:%{version}-%{release}}
Provides: php(modules_api) = %{php_api_version}
Provides: php(zend_extension_api) = %{zend_extension_api}
Provides: php(zend_module_api) = %{zend_module_api}
Provides: php5(thread-safety) = %{zend_zts}
Obsoletes: php-pecl-domxml
Obsoletes: php-session < 3:4.2.1-2
+Obsoletes: php-pcre < 4:5.2.0
# for the posttrans scriptlet, conflicts because in vserver enviroinment rpm package is not installed.
Conflicts: rpm < 4.4.2-0.2
Modu³ PHP dodaj±cy obs³ugê formularzy PDF poprzez bibliotekê Adobe
FDFTK.
-%package filepro
-Summary: filePro extension module for PHP
-Summary(pl): Modu³ filePro dla PHP
-Group: Libraries
-Requires(post,preun): %{name}-common = %{epoch}:%{version}-%{release}
-Requires: %{name}-common = %{epoch}:%{version}-%{release}
-
-%description filepro
-This is a dynamic shared object (DSO) for PHP that will add support
-for read-only access to filePro databases.
-
-%description filepro -l pl
-Modu³ PHP dodaj±cy mo¿liwo¶æ dostêpu (tylko do odczytu) do baz danych
-filePro.
-
%package ftp
Summary: FTP extension module for PHP
Summary(pl): Modu³ FTP dla PHP
Modu³ PHP umo¿liwiaj±cy korzystanie z biblioteki gmp do obliczeñ na
liczbach o dowolnej d³ugo¶ci.
-%package hwapi
-Summary: Hyperwave API extension module for PHP
-Summary(pl): Modu³ API Hyperwave dla PHP
-Group: Libraries
-Requires(post,preun): %{name}-common = %{epoch}:%{version}-%{release}
-Requires: %{name}-common = %{epoch}:%{version}-%{release}
-
-%description hwapi
-This is a dynamic shared object (DSO) for PHP that will add official
-Hyperwave API support.
-
-%description hwapi -l pl
-Modu³ PHP dodaj±cy obs³ugê Hyperwave.
-
%package iconv
Summary: iconv extension module for PHP
Summary(pl): Modu³ iconv dla PHP
Modu³ PHP dodaj±cy obs³ugê plików Flash (.swf) poprzez bibliotekê
ming.
-%package msession
-Summary: msession extension module for PHP
-Summary(pl): Modu³ msession dla PHP
-Group: Libraries
-Requires(post,preun): %{name}-common = %{epoch}:%{version}-%{release}
-Requires: %{name}-common = %{epoch}:%{version}-%{release}
-
-%description msession
-This is a dynamic shared object (DSO) for PHP that will allow you to
-use msession. msession is a high speed session daemon which can run
-either locally or remotely. It is designed to provide consistent
-session management for a PHP web farm.
-
-%description msession -l pl
-Modu³ PHP dodaj±cy umo¿liwiaj±cy korzystanie z demona msession. Jest
-to demon szybkiej obs³ugi sesji, który mo¿e dzia³aæ lokalnie lub na
-innej maszynie. S³u¿y do zapewniania spójnej obs³ugi sesji dla farmy
-serwerów.
-
%package mssql
Summary: MS SQL extension module for PHP
Summary(pl): Modu³ MS SQL dla PHP
Uwaga: to jest modu³ eksperymentalny. Ponadto nie jest przeznaczony do
u¿ywania z serwerem WWW - nie próbuj tego!
-%package pcre
-Summary: PCRE extension module for PHP
-Summary(pl): Modu³ PCRE dla PHP
-Group: Libraries
-Requires(post,preun): %{name}-common = %{epoch}:%{version}-%{release}
-Requires: %{name}-common = %{epoch}:%{version}-%{release}
-
-%description pcre
-This is a dynamic shared object (DSO) for PHP that will add Perl
-Compatible Regular Expression support.
-
-%description pcre -l pl
-Modu³ PHP umo¿liwiaj±cy korzystanie z perlowych wyra¿eñ regularnych
-(Perl Compatible Regular Expressions)
-
%package pdo
Summary: PHP Data Objects (PDO)
Summary(pl): Obs³uga PHP Data Objects (PDO)
%prep
%setup -q
-%patch37 -p1
+%patch36 -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
+
%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
+#%patch9 -p1 # TEST OR UPGRADE
cp php.ini-dist php.ini
%patch10 -p1
# for ac2.53b/am1.6b - AC_LANG_CXX has AM_CONDITIONAL, so cannot be invoked
%patch19 -p1
%patch20 -p1
%patch21 -p1
-%patch23 -p1
+#%patch23 -p1 # UPDATE?
%patch24 -p1
-%patch25 -p1
%patch26 -p1
%if %{with hardening}
%patch31 -p1
%patch32 -p1
%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%{?with_versioning:%patch36 -p1}
+%{?with_versioning:%patch35 -p1}
+%if "%{_lib}" == "lib64"
%patch38 -p1
+%endif
%patch39 -p1
# conflict seems to be resolved by recode patches
--with-flatfile \
--enable-dom=shared \
--enable-exif=shared \
- --enable-filepro=shared \
--enable-ftp=shared \
--enable-gd-native-ttf \
--enable-gd-jus-conf \
%endif
%{?with_fdf:--with-fdftk=shared} \
--with-iconv=shared \
- --with-filepro=shared \
--with-freetype-dir=shared \
--with-gettext=shared \
--with-gd=shared,/usr \
--with-gdbm \
--with-gmp=shared \
- %{?with_hwapi:--with-hwapi=shared} \
%{?with_imap:--with-imap=shared --with-imap-ssl} \
%{?with_interbase:--with-interbase=shared%{!?with_interbase_inst:,/usr}} \
--with-jpeg-dir=/usr \
%{?with_mime_magic:--with-mime-magic=shared,/usr/share/file/magic.mime}%{!?with_mime_magic:--disable-mime-magic} \
%{?with_ming:--with-ming=shared} \
%{?with_mm:--with-mm} \
- %{?with_msession:--with-msession=shared}%{!?with_msession:--without-msession} \
%{?with_mssql:--with-mssql=shared} \
--with-mysql=shared,/usr \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
%{?with_oci8:--with-oci8=shared} \
%{?with_openssl:--with-openssl=shared} \
--with-kerberos \
- %{!?with_pcre:--without-pcre-regex}%{?with_pcre:--with-pcre-regex=shared,/usr} \
+ %{!?with_pcre:--without-pcre-regex --disable-filter}%{?with_pcre:--with-pcre-regex=/usr} \
--with-pear=%{php_pear_dir} \
%{!?with_pgsql:--without-pgsql}%{?with_pgsql:--with-pgsql=shared,/usr} \
--with-png-dir=/usr \
%{!?with_xmlrpc:--without-xmlrpc}%{?with_xmlrpc:--with-xmlrpc=shared,/usr} \
--with-xsl=shared \
--with-zlib=shared \
- --with-zlib-dir=shared,/usr
+ --with-zlib-dir=shared,/usr \
+ --enable-zip=shared,/usr \
cp -f Makefile Makefile.$sapi
cp -f main/php_config.h php_config.h.$sapi
# must make this first, so modules can link against it.
%{__make} libphp_common.la
-
%{__make} build-modules
-# fix install paths, avoid evil rpaths
-#sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" libphp_common.la
-
%if %{with apache1}
%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cgi},%{_phpsharedir}} \
+install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cgi}} \
$RPM_BUILD_ROOT/home/services/{httpd,apache}/icons \
$RPM_BUILD_ROOT{%{_sbindir},%{_bindir}} \
$RPM_BUILD_ROOT/etc/{apache/conf.d,httpd/httpd.conf} \
install sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php.1
echo ".so php.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.cli.1
-# as of 5.0.5, phpextdist isn't installed by default
-install scripts/dev/phpextdist $RPM_BUILD_ROOT%{_bindir}
-
ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php
sed -e 's#%{_prefix}/lib/php#%{_libdir}/php#g' php.ini > $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
%endif
install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini
install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
-install %{SOURCE1} .
%if %{with apache1}
install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/apache/icons
ln -snf %{_datadir}/libtool/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/php/build
ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/php/build
+# 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.
+# this header file is required by e.g. filter PECL extension
+install -D ext/pcre/php_pcre.h $RPM_BUILD_ROOT%{_includedir}/php/ext/pcre/php_pcre.h
+
%clean
rm -rf $RPM_BUILD_ROOT
%postun fdf
%extension_postun
-%post filepro
-%extension_post
-
-%postun filepro
-%extension_postun
-
%post ftp
%extension_post
%postun gmp
%extension_postun
-%post hwapi
-%extension_post
-
-%postun hwapi
-%extension_postun
-
%post iconv
%extension_post
%postun ming
%extension_postun
-%post msession
-%extension_post
-
-%postun msession
-%extension_postun
-
%post mssql
%extension_post
%postun openssl
%extension_postun
-%post pcre
-%extension_post
-
-%postun pcre
-%extension_postun
-
%post pdo-dblib
%extension_post
%triggerun fdf -- %{name}-fdf < 4:5.0.4-9.1
%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*fdf\.so/d' %{_sysconfdir}/php.ini
-%triggerun filepro -- %{name}-filepro < 4:5.0.4-9.1
-%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*filepro\.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 gmp -- %{name}-gmp < 4:5.0.4-9.1
%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*gmp\.so/d' %{_sysconfdir}/php.ini
-%triggerun hwapi -- %{name}-hwapi < 4:5.0.4-9.1
-%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*hwapi\.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 ming -- %{name}-ming < 4:5.0.4-9.1
%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*ming\.so/d' %{_sysconfdir}/php.ini
-%triggerun msession -- %{name}-msession < 4:5.0.4-9.1
-%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*msession\.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
%{__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
%dir %{_sysconfdir}
%dir %{_sysconfdir}/conf.d
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
%attr(755,root,root) %{_libdir}/libphp_common-*.so
%dir %{extensionsdir}
-%dir %{_phpsharedir}
-# session_mm doesn't work with shared session
-#%files session
-#%defattr(644,root,root,755)
-#%attr(755,root,root) %{extensionsdir}/session.so
%doc ext/session/mod_files.sh
%files devel
%doc README.UNIX-BUILD-SYSTEM
%doc README.EXT_SKEL README.SELF-CONTAINED-EXTENSIONS
%doc CODING_STANDARDS
-%attr(755,root,root) %{_bindir}/phpextdist
%attr(755,root,root) %{_bindir}/phpize
%attr(755,root,root) %{_bindir}/php-config
%attr(755,root,root) %{_libdir}/libphp_common.so
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/exif.ini
%attr(755,root,root) %{extensionsdir}/exif.so
-%files filepro
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/filepro.ini
-%attr(755,root,root) %{extensionsdir}/filepro.so
-
%files ftp
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/ftp.ini
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/gmp.ini
%attr(755,root,root) %{extensionsdir}/gmp.so
-%if %{with hwapi}
-%files hwapi
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/hwapi.ini
-%attr(755,root,root) %{extensionsdir}/hwapi.so
-%endif
-
%files iconv
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/iconv.ini
%attr(755,root,root) %{extensionsdir}/ming.so
%endif
-%if %{with msession}
-%files msession
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/msession.ini
-%attr(755,root,root) %{extensionsdir}/msession.so
-%endif
-
%if %{with mssql}
%files mssql
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cli.d/pcntl.ini
%attr(755,root,root) %{extensionsdir}/pcntl.so
-%if %{with pcre}
-%files pcre
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pcre.ini
-%attr(755,root,root) %{extensionsdir}/pcre.so
-%endif
-
%files pdo
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo.ini