# - make additional headers added by mail patch configurable
# - apply -hardened patch by default ?
# - modularize session, standard (output from pure php -m)?
-# - fix reflection module to build it statically
#
# Conditional build:
%bcond_with db3 # use db3 packages instead of db (4.x) for Berkeley DB support
%undefine with_msession
%endif
-Summary: The PHP HTML-embedded scripting language for use with Apache
+Summary: PHP: Hypertext Preprocessor
Summary(fr): Le langage de script embarque-HTML PHP pour Apache
Summary(pl): Jêzyk skryptowy PHP - u¿ywany wraz z serwerem Apache
Summary(pt_BR): A linguagem de script PHP
Summary(uk): PHP ÷ÅÒÓ¦§ 5 - ÍÏ×Á ÐÒÅÐÒÏÃÅÓÕ×ÁÎÎÑ HTML-ÆÁÊ̦×, ×ÉËÏÎÕ×ÁÎÁ ÎÁ ÓÅÒ×ÅÒ¦
Name: php
Version: 5.1.2
-%define _rel 0.1
+%define _rel 5
Release: %{_rel}%{?with_hardening:hardened}
Epoch: 4
License: PHP
Group: Libraries
-# Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2
-Source0: http://snaps.php.net/php5.1-200601031130.tar.bz2
-# Source0-md5: f47e4528c30fb9865bebdd2ebbf66c8f
+Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2
+# Source0-md5: 79cee17e9db85be878000a2a4198378e
Source1: FAQ.%{name}
Source2: zend.gif
Source3: %{name}-module-install
Patch6: %{name}-build_modules.patch
Patch7: %{name}-sapi-ini-file.patch
Patch8: %{name}-no-metaccld.patch
+Patch9: %{name}-reflection.patch
Patch10: %{name}-ini.patch
Patch11: %{name}-acam.patch
Patch14: %{name}-allow-db31.patch
Patch31: %{name}-both-apxs.patch
Patch32: %{name}-builddir.patch
Patch33: %{name}-zlib-for-getimagesize.patch
-Icon: php.gif
+Patch34: %{name}-ini-search-path.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}
%{?with_imap:BuildRequires: imap-devel >= 1:2001-0.BETA.200107022325.2}
BuildRequires: libjpeg-devel
BuildRequires: libltdl-devel >= 1.4
-BuildRequires: libmbfl-devel
BuildRequires: libmcrypt-devel >= 2.4.4
BuildRequires: libpng-devel >= 1.0.8
BuildRequires: libtiff-devel
BuildRequires: mysql-devel >= 4.0.0
%{?with_mysqli:BuildRequires: mysql-devel >= 4.1.0}
BuildRequires: ncurses-ext-devel
-%{?with_ldap:BuildRequires: openldap-devel >= 2.0}
+%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
%if %{with openssl} || %{with ldap}
BuildRequires: openssl-devel >= 0.9.7d
%endif
Summary: PHP DSO module for apache 1.3.x
Summary(pl): Modu³ DSO (Dynamic Shared Object) php dla apache 1.3.x
Group: Development/Languages/PHP
-Requires(post,preun): %{__perl}
-Requires(post,preun): %{apxs1}
+Requires(triggerpostun): sed >= 4.0
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: apache1(EAPI) >= 1.3.33-2
Requires: apache1-mod_mime
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: apache(modules-api) = %{apache_modules_api}
+Requires: apache-mod_mime
Provides: php = %{epoch}:%{version}-%{release}
Obsoletes: phpfi
Requires(post,preun): %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: libxslt >= 1.0.18
-# Maybe it would be nice to add it here?
-#Provides: php-xslt
# actually not true, functionality is similar, but API differs
Obsoletes: php-xslt <= 3:4.3.8-1
Modu³ PHP umo¿liwiaj±cy u¿ywanie kompresji zlib.
%prep
-%setup -q -n php5.1-200601031130
+%setup -q
# this patch is broken by design, breaks --enable-versioning for example
# update: --enable-version is broken by itself, it disables dynamic modules.
%patch0 -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
%patch31 -p1
%patch32 -p1
%patch33 -p1
+%patch34 -p1
# conflict seems to be resolved by recode patches
rm -f ext/recode/config9.m4
--with-exec-dir=%{_bindir} \
--%{!?debug:dis}%{?debug:en}able-debug \
%{?with_zts:--enable-maintainer-zts} \
+ --enable-inline-optimization \
--enable-memory-limit \
--enable-bcmath=shared \
--enable-calendar=shared \
%{?with_pgsql:--with-pdo-pgsql=shared} \
%{?with_sqlite:--with-pdo-sqlite=shared,/usr} \
--enable-posix=shared \
- --disable-reflection \
+ --enable-reflection \
--enable-session \
--enable-shared \
--enable-shmop=shared \
--with-zlib-dir=shared,/usr
cp -f Makefile Makefile.$sapi
-
- # left for debugging purposes
cp -f main/php_config.h php_config.h.$sapi
done
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with apache1}
-%triggerpostun -- %{name} < 4:5.0.4-9.11
-%{apxs1} -e -A -n php5 %{_pkglibdir}/libphp5.so 1>&2
-%{__perl} -pi -e \
- 's|^AddType application/x-httpd-php \.php|#AddType application/x-httpd-php .php|' \
- /etc/apache/apache.conf
-%service -q apache restart
-%endif
-
%post
if [ "$1" = "1" ]; then
%if %{with apache1}
[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
-%if %{with apache2}
-%triggerpostun -- 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
-fi
+%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
-# extra trigger, if they did not upgrade to 4:5.0.4-7 but still had old php-apache.ini
-%triggerpostun -n apache-mod_php -- php < 4:5.0.4-7.1
+%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}
%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
%defattr(644,root,root,755)
%doc README.UNIX-BUILD-SYSTEM
%attr(755,root,root) %{extensionsdir}/recode.so
%endif
-# session_mm doesn't work with shared session
-#%files session
-#%defattr(644,root,root,755)
-#%attr(755,root,root) %{extensionsdir}/session.so
-
%if 0
# simplexml is needed by spl, and spl can't be built shared as of now (5.1.0RC3)
%files simplexml