]> git.pld-linux.org Git - packages/php4.git/blobdiff - php4.spec
- rel 51; switch module name to mod_php.so (first step to using alternatives and...
[packages/php4.git] / php4.spec
index 0bbf231b7ccc8468b754dd9b991091116dbbd2a7..d295ac523f21d72830782fc928d95e852ee5a096 100644 (file)
--- a/php4.spec
+++ b/php4.spec
 %bcond_without cpdf            # without cpdf extension module
 %bcond_without curl            # without CURL extension module
 %bcond_without domxslt         # without DOM XSLT/EXSLT support in DOM XML extension module
-%bcond_without fribidi         # without FriBiDi extension module
+%bcond_with    fribidi         # without FriBiDi extension module (use pecl-fribidi)
 %bcond_without imap            # without IMAP extension module
 %bcond_without interbase       # without InterBase extension module
 %bcond_without ldap            # without LDAP extension module
 %bcond_without mhash           # without mhash extension module
-%bcond_without ming            # without ming extension module
+%bcond_with    ming            # with ming extension module
 %bcond_without mm              # without mm support for session storage
 %bcond_without mnogosearch     # without mnogosearch extension module
 %bcond_without msession        # without msession extension module
 %bcond_without wddx            # without WDDX extension module
 %bcond_without xml             # without XML and DOMXML extension modules
 %bcond_without xmlrpc          # without XML-RPC extension module
+%bcond_with     system_xmlrpc_epi       # use system xmlrpc-epi library (broken on 64bit arches, see http://bugs.php.net/41611)
 %bcond_without xslt            # without XSLT extension module
-%bcond_without yaz             # without YAZ extension module
+%bcond_with    yaz             # without YAZ extension module
+%bcond_with    yp
 %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 experimental-zts
+%bcond_with    zts             # disable experimental-zts
 %bcond_with    versioning      # build with experimental versioning (to load php4/php5 into same apache)
 
 %define apxs1          /usr/sbin/apxs1
@@ -71,7 +73,7 @@
 %undefine      with_msession
 %endif
 
-%define                rel 6
+%define                rel 51
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):     Język skryptowy PHP
@@ -117,12 +119,13 @@ Patch19:  %{name}-xmlrpc-fix.patch
 Patch20:       %{name}-libtool.patch
 Patch21:       %{name}-allow-db31.patch
 Patch22:       %{name}-threads-acfix.patch
-Patch23:       %{name}-gmp.patch
+
 Patch24:       %{name}-qt.patch
 Patch25:       %{name}-no_pear_install.patch
 Patch26:       %{name}-zlib.patch
 Patch27:       %{name}-db-shared.patch
 Patch28:       %{name}-sybase-fix.patch
+Patch29:       %{name}-openssl.patch
 Patch30:       %{name}-mnogosearch-fix.patch
 Patch31:       %{name}-stupidapache_version.patch
 Patch33:       %{name}-uint32_t.patch
@@ -144,6 +147,13 @@ Patch49:   %{name}-ac.patch
 Patch50:       %{name}-mime_magic.patch
 Patch51:       %{name}-tds.patch
 Patch52:       %{name}-lib64.patch
+Patch53:       %{name}-silent-session-cleanup.patch
+Patch54:       %{name}-m4-divert.patch
+Patch55:       %{name}-libpng.patch
+Patch56:       %{name}-gmp.patch
+Patch57:       %{name}-pcre.patch
+Patch58:       %{name}-apache24.patch
+Patch59:       php-bug-68486.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}
@@ -170,7 +180,7 @@ BuildRequires:      freetype-devel >= 2.0
 %{?with_fribidi:BuildRequires: fribidi-devel >= 0.10.4}
 BuildRequires: gdbm-devel
 BuildRequires: gmp-devel
-%{?with_imap:BuildRequires:    krb5-devel}
+%{?with_imap:BuildRequires:    heimdal-devel >= 0.7}
 %{?with_imap:BuildRequires:    imap-devel >= 1:2001-0.BETA.200107022325.2}
 %{?with_java:BuildRequires:    jdk >= 1.1}
 %{?with_cpdf:BuildRequires:    libcpdf-devel >= 2.02r1-2}
@@ -180,11 +190,15 @@ BuildRequires:    libmcal-devel
 BuildRequires: libmcrypt-devel >= 2.4.4
 BuildRequires: libpng-devel >= 1.0.8
 BuildRequires: libtiff-devel
-BuildRequires: libtool >= 2.2
+%if "%{pld_release}" != "ac"
+BuildRequires: libtool >= 2:2.2
+%else
+BuildRequires: libtool >= 1.4.3
+%endif
 %{?with_xml:BuildRequires:     libxml2-devel >= 2.2.7}
 %{?with_domxslt:BuildRequires: libxslt-devel >= 1.0.3}
 %{?with_mhash:BuildRequires:   mhash-devel}
-%{?with_ming:BuildRequires:    ming-devel >= 0.1.0}
+%{?with_ming:BuildRequires:    ming-devel >= 0.3.0}
 %{?with_mm:BuildRequires:      mm-devel >= 1.3.0}
 %{?with_mnogosearch:BuildRequires:     mnogosearch-devel >= 3.2.29}
 BuildRequires: mysql-devel >= 3.23.32
@@ -198,18 +212,20 @@ BuildRequires:    pam-devel
 BuildRequires: pcre-devel
 %{?with_pdf:BuildRequires:     pdflib-devel >= 4.0.0}
 %{?with_msession:BuildRequires:        phoenix-devel}
+BuildRequires: pkgconfig
 %{?with_pgsql:BuildRequires:   postgresql-backend-devel >= 7.2}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 %{?with_qtdom:BuildRequires:   qt-devel >= 2.2.0}
 BuildRequires: readline-devel
 %{?with_recode:BuildRequires:  recode-devel >= 3.5d-3}
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpmbuild(macros) >= 1.236
 %{?with_xslt:BuildRequires:    sablotron-devel >= 0.96}
 BuildRequires: sed >= 4.0
 BuildRequires: t1lib-devel
 %{?with_odbc:BuildRequires:    unixODBC-devel}
-%{?with_xmlrpc:BuildRequires:  xmlrpc-epi-devel}
+%{?with_system_xmlrpc_epi:BuildRequires:       xmlrpc-epi-devel}
 %{?with_yaz:BuildRequires:     yaz-devel >= 1.9}
 BuildRequires: zip
 BuildRequires: zlib-devel >= 1.0.9
@@ -363,7 +379,6 @@ Summary:    php4 as CLI interpreter
 Summary(pl.UTF-8):     php4 jako interpreter działający z linii poleceń
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Provides:      php-cli = %{epoch}:%{version}-%{release}
 
 %description cli
 php4 as CLI interpreter.
@@ -432,7 +447,11 @@ Group:             Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      autoconf
 Requires:      automake
-Requires:      libtool >= 2.2
+%if "%{pld_release}" != "ac"
+Requires:      libtool >= 2:2.2
+%else
+Requires:      libtool
+%endif
 Obsoletes:     php-devel
 
 %description devel
@@ -956,7 +975,7 @@ Summary:    mime_magic extension module for PHP
 Summary(pl.UTF-8):     Moduł mime_magic dla PHP
 Group:         Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Requires:      /usr/share/file/magic.mime
+Requires:      /usr/share/misc/magic.mime
 Provides:      php(mime_magic)
 
 %description mime_magic
@@ -1575,13 +1594,13 @@ cp php.ini-dist php.ini
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
-# %patch23 -p1
+
 %patch24 -p1
 %patch25 -p1
 %patch26 -p1
 %patch27 -p1
 %patch28 -p1
-
+%patch29 -p1
 %patch30 -p1
 %patch31 -p1
 %patch33 -p1
@@ -1606,6 +1625,13 @@ cp php.ini-dist php.ini
 %if "%{_lib}" == "lib64"
 %patch52 -p1
 %endif
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+%patch56 -p1
+%patch57 -p1
+%patch58 -p1
+%patch59 -p1
 
 %if %{with hardening}
 zcat %{SOURCE8} | patch -p1
@@ -1721,7 +1747,7 @@ for sapi in $sapis; do
        %{?with_wddx:--enable-wddx=shared} \
        %{!?with_xml:--disable-xml}%{?with_xml:--enable-xml=shared} \
        %{?with_xslt:--enable-xslt=shared} \
-       --enable-yp=shared \
+       %{?with_yp:--enable-yp=shared} \
        --with-bz2=shared \
        %{?with_cpdf:--with-cpdflib=shared} \
        --with-crack=shared \
@@ -1752,7 +1778,7 @@ for sapi in $sapis; do
        --with-mcal=shared,/usr \
        --with-mcrypt=shared \
        %{?with_mhash:--with-mhash=shared} \
-       --with-mime-magic=shared,/usr/share/file/magic.mime \
+       --with-mime-magic=shared,/usr/share/misc/magic.mime \
        %{?with_ming:--with-ming=shared} \
        %{!?with_mnogosearch:--without-mnogosearch}%{?with_mnogosearch:--with-mnogosearch=shared,/usr} \
        %{?with_msession:--with-msession=shared}%{!?with_msession:--without-msession} \
@@ -1777,7 +1803,7 @@ for sapi in $sapis; do
        --with-t1lib=shared \
        --with-tiff-dir=/usr \
        %{?with_xml:--with-dom=shared} \
-       %{!?with_xmlrpc:--without-xmlrpc}%{?with_xmlrpc:--with-xmlrpc=shared,/usr} \
+       %{!?with_xmlrpc:--without-xmlrpc}%{?with_xmlrpc:--with-xmlrpc=shared%{?with_system_xmlrpc_epi:,/usr}} \
        %{?with_xslt:--with-xslt-sablot=shared} --without-sablot-js \
        %{?with_yaz:--with-yaz=shared} \
        --with-zip=shared \
@@ -1791,6 +1817,9 @@ done
 %{__make} libphp_common.la
 %{__make} build-modules
 
+# version suffix
+v=$(echo %{version} | cut -d. -f1-2)
+
 %if %{with apache1}
 %{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp4.la -f Makefile.apxs1
 %endif
@@ -1838,12 +1867,18 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c
 %if %{with apache1}
 libtool --silent --mode=install install sapi/apache/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache1
 rm $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4.la
+
+mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4{,-$v}.so
+ln -s libphp4-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/mod_php.so
 %endif
 
 # install apache2 DSO module
 %if %{with apache2}
 libtool --silent --mode=install install sapi/apache2handler/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache
 rm $RPM_BUILD_ROOT%{_libdir}/apache/libphp4.la
+
+mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp4{,-$v}.so
+ln -s libphp4-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so
 %endif
 
 # better solution?
@@ -1907,11 +1942,16 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi,cli,cgi-fcgi,apache,apache2handler
 mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/{ncurses,pcntl,readline}.ini,cli.d}
 
 # use system automake and {lib,sh}tool
-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
+%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
 
 # as a result of ext/pcre/pcrelib removal in %%prep, ext/pcre/php_pcre.h
@@ -1983,6 +2023,12 @@ if [ -f %{_sysconfdir}/php-apache.ini.rpmsave ]; then
 fi
 %endif
 
+%triggerpostun -n apache1-mod_%{name} -- apache1-mod_%{name} < 3:4.4.9-51
+sed -i -e 's#modules/libphp4.so#modules/mod_php.so#g' /etc/apache/conf.d/*_mod_php4.conf
+
+%triggerpostun -n apache-mod_%{name} -- apache-mod_%{name} < 3:4.4.9-51
+sed -i -e 's#modules/libphp4.so#modules/mod_php.so#g' /etc/httpd/conf.d/*_mod_php4.conf
+
 %post bcmath
 %extension_post
 
@@ -2600,7 +2646,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/apache/conf.d/*_mod_php4.conf
 %dir %{_sysconfdir}/apache.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
-%attr(755,root,root) %{_libdir}/apache1/libphp4.so
+%attr(755,root,root) %{_libdir}/apache1/mod_php.so
+%attr(755,root,root) %{_libdir}/apache1/libphp4-*.so
 %endif
 
 %if %{with apache2}
@@ -2610,7 +2657,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/conf.d/*_mod_php4.conf
 %dir %{_sysconfdir}/apache2handler.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
-%attr(755,root,root) %{_libdir}/apache/libphp4.so
+%attr(755,root,root) %{_libdir}/apache/mod_php.so
+%attr(755,root,root) %{_libdir}/apache/libphp4-*.so
 %endif
 
 %if %{with fcgi}
@@ -2665,6 +2713,7 @@ fi
 # FIXME: how exactly this is needed? as it contains libdir for apache1 or apache2
 %{_libdir}/libphp_common.la
 %{_includedir}/php
+%dir %{_libdir}/php
 %{_libdir}/php/build
 %{_mandir}/man1/php-config.1*
 %{_mandir}/man1/phpize.1*
@@ -3124,11 +3173,13 @@ fi
 %attr(755,root,root) %{extensionsdir}/yaz.so
 %endif
 
+%if %{with yp}
 %files yp
 %defattr(644,root,root,755)
 %doc ext/yp/CREDITS
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/yp.ini
 %attr(755,root,root) %{extensionsdir}/yp.so
+%endif
 
 %files zip
 %defattr(644,root,root,755)
This page took 0.049565 seconds and 4 git commands to generate.