# 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 ?
ERROR: You need to select at least one Apache SAPI to build shared modules.
%endif
-%define _rel 0.1
+%define _rel 0.2
Summary: PHP: Hypertext Preprocessor
Summary(fr): Le langage de script embarque-HTML PHP
Summary(pl): Jêzyk skryptowy PHP
Patch31: %{name}-both-apxs.patch
Patch32: %{name}-builddir.patch
Patch33: %{name}-zlib-for-getimagesize.patch
-Patch34: %{name}-ini-search-path.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}
Provides: %{name}-simplexml = %{epoch}:%{version}-%{release}
Provides: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: %{name}-standard = %{epoch}:%{version}-%{release}
-Provides: %{name}-pcre = %{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
%patch31 -p1
%patch32 -p1
%patch33 -p1
-#%patch34 -p1 # UPDATE
%{?with_versioning:%patch35 -p1}
%if "%{_lib}" == "lib64"
%patch38 -p1
%endif
+%patch39 -p1
# conflict seems to be resolved by recode patches
rm -f ext/recode/config9.m4
%{?with_oci8:--with-oci8=shared} \
%{?with_openssl:--with-openssl=shared} \
--with-kerberos \
- %{!?with_pcre:--without-pcre-regex}%{?with_pcre:--with-pcre-regex=/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 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
%attr(755,root,root) %{_libdir}/libphp_common-*.so
%dir %{extensionsdir}
-# 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