# db, hyperwave, java, mcal, overload, qtdom
# and removed from php 5.1:
# cpdf, fam, yp, oracle
+# and removed from php 5.1.3:
+# msession
# and removed from php 5.2:
# filepro, hw
# - mime_magic can't handle new "string/*" entries in magic.mime
-# thus doesn't work with system magic.mime databse
+# thus doesn't work with system magic.mime database
# - make additional headers added by mail patch configurable
# - apply -hardened patch by default ?
# - modularize session, standard (output from pure php -m)?
ERROR: You need to select at least one Apache SAPI to build shared modules.
%endif
-%define _rel 0.11
+%define _rel 0.20
Summary: PHP: Hypertext Preprocessor
Summary(fr): Le langage de script embarque-HTML PHP
Summary(pl): Jêzyk skryptowy PHP
Source7: %{name}-cli.ini
Source8: http://www.hardened-php.net/hardening-patch-5.0.4-0.3.0.patch.gz
# Source8-md5: 47a742fa9fab2826ad10c13a2376111a
+# Taken from: http://browsers.garykeith.com/downloads.asp
+Source9: %{name}_browscap.ini
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}-curl.patch
Patch14: %{name}-allow-db31.patch
Patch15: %{name}-threads-acfix.patch
Patch16: %{name}-tsrmlsfetchgcc2.patch
Patch36: %{name}-linkflags-clean.patch
Patch38: %{name}-amd64.patch
Patch39: %{name}-pear.patch
+Patch40: %{name}-db4.5.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}
use of PHP coding is probably as a replacement for CGI scripts. The
mod_php module enables the Apache web server to understand and process
the embedded PHP language in web pages. This package contains php
-version %{version}. If you use applications which specifically rely on
-PHP/FI (PHP v2 and earlier), you should instead install the PHP/FI
-module contained in the phpfi package. If you're just starting with
-PHP, you should install this package. You'll also need to install the
-Apache web server.
+version %{version}.
%description -l fr
PHP est un langage de script embarque dans le HTM. PHP essaye de
probablement en remplacement de scripts CGI. Le module mod_php permet
au serveur web apache de comprendre et de traiter le langage PHP
integre dans des pages web. Ce package contient php version
-%{version}. Si vous utilisez des applications qui utilisent
-specifiquement PHP/FI, vous devrez installer le module PHP/FI inclus
-dans le package mod_php. Si vous debutez avec PHP, vous devriez
-installer ce package. Vous aurez egalement besoin dinstaller le
-serveur web Apache.
+%{version}.
%description -l pl
PHP jest jêzykiem skryptowym, którego polecenia umieszcza siê w
Modu³ PHP dodaj±cy obs³ugê formularzy PDF poprzez bibliotekê Adobe
FDFTK.
+%package filter
+Summary: extension for safely dealing with input parameters
+Summary(pl): rozszerzenie do bezpiecznej obs³ugi danych wej¶ciowych
+Group: Libraries
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(filter)
+
+%description filter
+We all know that you should always check input variables, but PHP does
+not offer really good functionality for doing this in a safe way. The
+Input Filter extension is meant to address this issue by implementing
+a set of filters and mechanisms that users can use to safely access
+their input data.
+
+%description filter -l pl
+Wiadomo, ¿e trzeba zawsze sprawdzaæ zmienne wej¶ciowe, ale PHP nie
+oferuje naprawdê dobrej funkcjonalno¶ci do robienia tego w sposób
+bezpieczny. Rozszerzenie Input Filter ma rozwi±zaæ ten problem poprzez
+zaimplementowanie zestawu filtrów i mechanizmów, których u¿ytkownicy
+mog± bezpiecznie u¿ywaæ do dostêpu do danych.
+
%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 hash
+Summary: HASH Message Digest Framework
+Summary(pl): szkielet do obliczania skrótów wiadomo¶ci
+Group: Libraries
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(hash)
+
+%description hash
+Native implementations of common message digest algorithms using a
+generic factory method.
+
+%description hash -l pl
+Natywne implementacje popularnych algorytmów obliczania skrótów
+wiadomo¶ci przy u¿yciu wspólnego interfejsu.
+
%package iconv
Summary: iconv extension module for PHP
Summary(pl): Modu³ iconv dla PHP
%description interbase -l pl
Modu³ PHP umo¿liwiaj±cy dostêp do baz danych InterBase i Firebird.
+%package json
+Summary: PHP C extension for JSON serialization
+Summary(pl): rozszerzenie C PHP dla serializacji JSON
+Group: Libraries
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(json)
+
+%description json
+php-json is an extremely fast PHP C extension for JSON (JavaScript
+Object Notation) serialisation.
+
+%description json -l pl
+php-json to bardzo szybkie rozszerzenie C PHP dla serializacji JSON
+(JavaScript Object Notation).
+
%package ldap
Summary: LDAP extension module for PHP
Summary(pl): Modu³ LDAP dla PHP
Uwaga: to jest modu³ eksperymentalny.
+%package xmlwriter
+Summary: provides fast, non-cached, forward-only means to write XML data
+Summary(pl): szybka, nie cachowana metoda zapisu danych w formacie XML
+Group: Libraries
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(xmlwriter)
+
+%description xmlwriter
+This extension wraps the libxml xmlWriter API. Represents a writer
+that provides a non-cached, forward-only means of generating streams
+or files containing XML data.
+
+%description xmlwriter -l pl
+To rozszerzenie obudowuje API xmlWriter z libxml. Reprezentuje obs³ugê
+zapisu dostarczaj±c± nie cachowanych metod generowania strumieni lub
+plików zawieraj±cych dane XML.
+
%package xsl
Summary: xsl extension module for PHP
Summary(pl): Modu³ xsl dla PHP
%patch2 -p1
%patch3 -p1
%patch4 -p1
-
+%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
cp php.ini-dist php.ini
%patch10 -p1
# for ac2.53b/am1.6b - AC_LANG_CXX has AM_CONDITIONAL, so cannot be invoked
# conditionally...
%patch11 -p1
+%patch12 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch38 -p1
%endif
%patch39 -p1
+%patch40 -p1
# conflict seems to be resolved by recode patches
rm -f ext/recode/config9.m4
--enable-mbregex \
--enable-pcntl=shared \
--enable-pdo=shared \
+ --enable-json=shared \
+ --enable-hash=shared \
+ --enable-xmlwriter=shared \
%if %{with mssql} || %{with sybase} || %{with sybase_ct}
--with-pdo-dblib=shared \
%endif
%{?with_oci8:--with-oci8=shared} \
%{?with_openssl:--with-openssl=shared} \
--with-kerberos \
- %{!?with_pcre:--without-pcre-regex --disable-filter}%{?with_pcre:--with-pcre-regex=/usr} \
+ %{!?with_pcre:--without-pcre-regex --disable-filter}%{?with_pcre:--with-pcre-regex=/usr --enable-filter=shared} \
--with-pear=%{php_pear_dir} \
%{!?with_pgsql:--without-pgsql}%{?with_pgsql:--with-pgsql=shared,/usr} \
--with-png-dir=/usr \
%endif
install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini
install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
+install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/browscap.ini
%if %{with apache1}
install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/apache/icons
%service -q httpd restart
fi
-# so tired of typing... so decided to create macros
-# macro called at extension post scriptlet
-%define extension_post \
-if [ "$1" = "1" ]; then \
- [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \
- [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart \
-fi
-
-# macro called at extension postun scriptlet
-%define extension_postun \
-if [ "$1" = "0" ]; then \
- [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \
- [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart \
-fi
-
%post common -p /sbin/ldconfig
%postun common -p /sbin/ldconfig
fi
%endif
-%post bcmath
-%extension_post
-
-%postun bcmath
-%extension_postun
-
-%post bzip2
-%extension_post
-
-%postun bzip2
-%extension_postun
-
-%post calendar
-%extension_post
-
-%postun calendar
-%extension_postun
-
-%post ctype
-%extension_post
-
-%postun ctype
-%extension_postun
-
-%post curl
-%extension_post
-
-%postun curl
-%extension_postun
-
-%post dba
-%extension_post
-
-%postun dba
-%extension_postun
-
-%post dbase
-%extension_post
-
-%postun dbase
-%extension_postun
-
-%post dom
-%extension_post
-
-%postun dom
-%extension_postun
-
-%post exif
-%extension_post
-
-%postun exif
-%extension_postun
-
-%post fdf
-%extension_post
-
-%postun fdf
-%extension_postun
-
-%post ftp
-%extension_post
-
-%postun ftp
-%extension_postun
-
-%post gd
-%extension_post
-
-%postun gd
-%extension_postun
-
-%post gettext
-%extension_post
-
-%postun gettext
-%extension_postun
-
-%post gmp
-%extension_post
-
-%postun gmp
-%extension_postun
-
-%post iconv
-%extension_post
-
-%postun iconv
-%extension_postun
-
-%post imap
-%extension_post
-
-%postun imap
-%extension_postun
-
-%post interbase
-%extension_post
-
-%postun interbase
-%extension_postun
-
-%post ldap
-%extension_post
-
-%postun ldap
-%extension_postun
-
-%post mbstring
-%extension_post
-
-%postun mbstring
-%extension_postun
-
-%post mcrypt
-%extension_post
-
-%postun mcrypt
-%extension_postun
-
-%post mhash
-%extension_post
-
-%postun mhash
-%extension_postun
-
-%post mime_magic
-%extension_post
-
-%postun mime_magic
-%extension_postun
-
-%post ming
-%extension_post
-
-%postun ming
-%extension_postun
-
-%post mssql
-%extension_post
-
-%postun mssql
-%extension_postun
-
-%post mysql
-%extension_post
-
-%postun mysql
-%extension_postun
-
-%post mysqli
-%extension_post
-
-%postun mysqli
-%extension_postun
-
-%post oci8
-%extension_post
-
-%postun oci8
-%extension_postun
-
-%post odbc
-%extension_post
-
-%postun odbc
-%extension_postun
-
-%post openssl
-%extension_post
-
-%postun openssl
-%extension_postun
-
-%post pdo-dblib
-%extension_post
-
-%postun pdo-dblib
-%extension_postun
-
-%post pdo-firebird
-%extension_post
-
-%postun pdo-firebird
-%extension_postun
-
-%post pdo-mysql
-%extension_post
-
-%postun pdo-mysql
-%extension_postun
-
-%post pdo-odbc
-%extension_post
-
-%postun pdo-odbc
-%extension_postun
-
-%post pdo-pgsql
-%extension_post
-
-%postun pdo-pgsql
-%extension_postun
-
-%post pdo-sqlite
-%extension_post
-
-%postun pdo-sqlite
-%extension_postun
-
-%post pgsql
-%extension_post
-
-%postun pgsql
-%extension_postun
-
-%post posix
-%extension_post
-
-%postun posix
-%extension_postun
-
-%post pspell
-%extension_post
-
-%postun pspell
-%extension_postun
-
-%post recode
-%extension_post
-
-%postun recode
-%extension_postun
-
-%post shmop
-%extension_post
-
-%postun shmop
-%extension_postun
-
-%post snmp
-%extension_post
-
-%postun snmp
-%extension_postun
-
-%post soap
-%extension_post
-
-%postun soap
-%extension_postun
-
-%post sockets
-%extension_post
-
-%postun sockets
-%extension_postun
-
-%post sqlite
-%extension_post
-
-%postun sqlite
-%extension_postun
-
-%post sybase
-%extension_post
-
-%postun sybase
-%extension_postun
-
-%post sybase-ct
-%extension_post
-
-%postun sybase-ct
-%extension_postun
-
-%post sysvmsg
-%extension_post
-
-%postun sysvmsg
-%extension_postun
-
-%post sysvsem
-%extension_post
-
-%postun sysvsem
-%extension_postun
-
-%post sysvshm
-%extension_post
-
-%postun sysvshm
-%extension_postun
-
-%post tidy
-%extension_post
-
-%postun tidy
-%extension_postun
-
-%post tokenizer
-%extension_post
-
-%postun tokenizer
-%extension_postun
-
-%post wddx
-%extension_post
-
-%postun wddx
-%extension_postun
-
-%post xml
-%extension_post
-
-%postun xml
-%extension_postun
-
-%post xmlreader
-%extension_post
-
-%postun xmlreader
-%extension_postun
-
-%post xmlrpc
-%extension_post
-
-%postun xmlrpc
-%extension_postun
-
-%post xsl
-%extension_post
-
-%postun xsl
-%extension_postun
+# macro called at extension post scriptlet
+%define extension_post \
+if [ "$1" = "1" ]; then \
+ [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \
+ [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart \
+fi
-%post zip
-%extension_post
+# macro called at extension postun scriptlet
+%define extension_postun \
+if [ "$1" = "0" ]; then \
+ [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \
+ [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart \
+fi
-%postun zip
+%define extension_scripts() \
+%post %1 \
+%extension_post \
+\
+%postun %1 \
%extension_postun
-%post zlib
-%extension_post
-
-%postun zlib
-%extension_postun
+# extension scripts defines
+%extension_scripts bcmath
+%extension_scripts bzip2
+%extension_scripts calendar
+%extension_scripts ctype
+%extension_scripts curl
+%extension_scripts dba
+%extension_scripts dbase
+%extension_scripts dom
+%extension_scripts exif
+%extension_scripts fdf
+%extension_scripts filter
+%extension_scripts ftp
+%extension_scripts gd
+%extension_scripts gettext
+%extension_scripts gmp
+%extension_scripts hash
+%extension_scripts iconv
+%extension_scripts imap
+%extension_scripts interbase
+%extension_scripts json
+%extension_scripts ldap
+%extension_scripts mbstring
+%extension_scripts mcrypt
+%extension_scripts mhash
+%extension_scripts mime_magic
+%extension_scripts ming
+%extension_scripts mssql
+%extension_scripts mysql
+%extension_scripts mysqli
+%extension_scripts oci8
+%extension_scripts odbc
+%extension_scripts openssl
+%extension_scripts pdo-dblib
+%extension_scripts pdo-firebird
+%extension_scripts pdo-mysql
+%extension_scripts pdo-odbc
+%extension_scripts pdo-pgsql
+%extension_scripts pdo-sqlite
+%extension_scripts pgsql
+%extension_scripts posix
+%extension_scripts pspell
+%extension_scripts recode
+%extension_scripts shmop
+%extension_scripts snmp
+%extension_scripts soap
+%extension_scripts sockets
+%extension_scripts sqlite
+%extension_scripts sybase
+%extension_scripts sybase-ct
+%extension_scripts sysvmsg
+%extension_scripts sysvsem
+%extension_scripts sysvshm
+%extension_scripts tidy
+%extension_scripts tokenizer
+%extension_scripts wddx
+%extension_scripts xml
+%extension_scripts xmlreader
+%extension_scripts xmlrpc
+%extension_scripts xmlwriter
+%extension_scripts xsl
+%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
%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 %{extensionsdir}
%attr(755,root,root) %{extensionsdir}/fdf.so
%endif
+%files filter
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/filter.ini
+%attr(755,root,root) %{extensionsdir}/filter.so
+
%files exif
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/exif.ini
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/gmp.ini
%attr(755,root,root) %{extensionsdir}/gmp.so
+%files hash
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/hash.ini
+%attr(755,root,root) %{extensionsdir}/hash.so
+
%files iconv
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/iconv.ini
%attr(755,root,root) %{extensionsdir}/interbase.so
%endif
+%files json
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/json.ini
+%attr(755,root,root) %{extensionsdir}/json.so
+
%if %{with ldap}
%files ldap
%defattr(644,root,root,755)
%endif
%if 0
-# simplexml is needed by spl, and spl can't be built shared as of now (5.1.0RC3)
+# simplexml is needed by spl, and spl can't be built shared as of now (5.2.0)
+# simplexml can be built shared, but SPL startup fails
+# we could add R: -simplexml to -common...
%files simplexml
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/simplexml.ini
%attr(755,root,root) %{extensionsdir}/xmlrpc.so
%endif
+%files xmlwriter
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/xmlwriter.ini
+%attr(755,root,root) %{extensionsdir}/xmlwriter.so
+
%files xsl
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/xsl.ini