]> git.pld-linux.org Git - packages/php4.git/blobdiff - php4.spec
- rel 59; openssl 1.1.1 support
[packages/php4.git] / php4.spec
index a0c9b9c2f5cc119799dccba016fbf79d2e79fbf8..a7652324c629df08913fdc0a3e1853f88ce648fb 100644 (file)
--- a/php4.spec
+++ b/php4.spec
@@ -5,10 +5,8 @@
 # TODO:
 # - make additional headers added by mail patch configurable
 # - too many unneccessary libs:
-#  - php4-common-4.4.0-14 marks heimdal-libs-0.7.1-1 (cap heimdal-libs)
-#     heimdal-libs-0.7.1-1 marks openldap-libs-2.2.29-1 (cap liblber-2.2.so.7()(64bit))
-#       openldap-libs-2.2.29-1 marks cyrus-sasl-2.1.21-3 (cap cyrus-sasl)
-#  - php4-common-4.4.6-4 marks rpm-lib-4.4.2-43 (cap librpm-4.4.so()(64bit))
+#  - libkrb5.so.3 is needed by (installed) php4-common-4.4.8-15.i686
+#  - php4-common-4.4.8-15.i686 marks net-snmp-libs-5.4.1.2-1.i686 (cap libnetsnmp.so.15)
 #    php5-common doesn't have such deps
 #  - php4-cli pulls: libltdl
 # - above is caused by openssl linked in statically as openssl links with kerberos
 %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
@@ -73,7 +73,7 @@
 %undefine      with_msession
 %endif
 
-%define                rel 1
+%define                rel 59
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):     Język skryptowy PHP
@@ -89,7 +89,6 @@ Group:                Libraries
 Source0:       http://www.php.net/distributions/php-%{version}.tar.bz2
 # Source0-md5: 2e3b2a0e27f10cb84fd00e5ecd7a1880
 #Source0:      http://cvs.php.net/viewvc.cgi/phpweb/distributions/php-%{version}.tar.bz2?revision=1.1
-Source2:       zend.gif
 Source3:       %{name}-mod_php.conf
 Source4:       %{name}-cgi-fcgi.ini
 Source5:       %{name}-cgi.ini
@@ -120,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
@@ -147,6 +147,14 @@ 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
+Patch60:       %{name}-libx32.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}
@@ -173,7 +181,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}
@@ -183,11 +191,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
@@ -201,18 +213,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
@@ -315,12 +329,11 @@ php4 as DSO module for apache 1.3.x.
 php4 jako moduł DSO (Dynamic Shared Object) dla apache 1.3.x.
 
 %package -n apache-mod_php4
-Summary:       php4 DSO module for apache 2.x
-Summary(pl.UTF-8):     Moduł DSO (Dynamic Shared Object) php4 dla apache 2.x
+Summary:       php4 support for apache 2.x
+Summary(pl.UTF-8):     Wsparcie php4 dla apache 2.x
 Group:         Development/Languages/PHP
+Requires:       apache-mod_php4-core = %{epoch}:%{version}-%{release}
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Requires:      apache(modules-api) = %{apache_modules_api}
-Requires:      apache-mod_mime
 Provides:      webserver(php) = %{version}
 Obsoletes:     apache-mod_php < 1:4.1.1
 Obsoletes:     phpfi
@@ -328,9 +341,23 @@ Obsoletes: phpfi
 Obsoletes:     php4 < 3:4.3.11-4.16
 
 %description -n apache-mod_php4
-php4 as DSO module for apache 2.x.
+php4 support for apache 2.x.
 
 %description -n apache-mod_php4 -l pl.UTF-8
+Wsparcie php4 dla apache 2.x.
+
+%package -n apache-mod_php4-core
+Summary:       php4 DSO module for apache 2.x
+Summary(pl.UTF-8):     Moduł DSO (Dynamic Shared Object) php4 dla apache 2.x
+Group:         Development/Languages/PHP
+Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      apache(modules-api) = %{apache_modules_api}
+Requires:      apache-mod_mime
+
+%description -n apache-mod_php4-core
+php4 as DSO module for apache 2.x.
+
+%description -n apache-mod_php4-core -l pl.UTF-8
 php4 jako moduł DSO (Dynamic Shared Object) dla apache 2.x.
 
 %package fcgi
@@ -366,7 +393,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.
@@ -403,7 +429,6 @@ Provides:   php(session)
 Provides:      php(standard)
 Provides:      php(zend_extension_api) = %{zend_extension_api}
 Provides:      php(zend_module_api) = %{zend_module_api}
-Provides:      php-common = %{epoch}:%{version}-%{release}
 Provides:      php4(debug) = %{php_debug}
 Provides:      php4(thread-safety) = %{zend_zts}
 Obsoletes:     php-session < 3:4.2.1-2
@@ -435,7 +460,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
@@ -959,7 +988,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
@@ -1578,13 +1607,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
@@ -1609,6 +1638,16 @@ 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 "%{_lib}" == "libx32"
+%patch60 -p1
+%endif
 
 %if %{with hardening}
 zcat %{SOURCE8} | patch -p1
@@ -1724,7 +1763,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 \
@@ -1755,7 +1794,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} \
@@ -1780,7 +1819,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 \
@@ -1794,6 +1833,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
@@ -1825,11 +1867,12 @@ cp -af php_config.h.cli main/php_config.h
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}} \
-       $RPM_BUILD_ROOT%{_datadir}/apache-icons \
        $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}} \
        $RPM_BUILD_ROOT{/etc/apache/conf.d,/etc/httpd/conf.d} \
        $RPM_BUILD_ROOT%{_mandir}/man1
 
+v=$(echo %{version} | cut -d. -f1-2)
+
 # install the apache modules' files
 %{__make} install-headers install-build install-modules install-programs \
        INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -1842,12 +1885,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?
@@ -1878,13 +1927,11 @@ install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini
 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
 
 %if %{with apache1}
-install %{SOURCE2} php.gif $RPM_BUILD_ROOT%{_datadir}/apache-icons
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php4.conf
 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache.ini
 %endif
 
 %if %{with apache2}
-install %{SOURCE2} php.gif $RPM_BUILD_ROOT%{_datadir}/apache-icons
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/httpd/conf.d/70_mod_php4.conf
 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
 %endif
@@ -1913,11 +1960,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
@@ -1989,6 +2041,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
 
@@ -2606,8 +2664,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
-%{_datadir}/apache-icons/*
+%attr(755,root,root) %{_libdir}/apache1/mod_php.so
+%attr(755,root,root) %{_libdir}/apache1/libphp4-*.so
 %endif
 
 %if %{with apache2}
@@ -2615,10 +2673,13 @@ fi
 %defattr(644,root,root,755)
 %doc sapi/apache2handler/{CREDITS,README}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/conf.d/*_mod_php4.conf
+%attr(755,root,root) %{_libdir}/apache/mod_php.so
+
+%files -n apache-mod_php4-core
+%defattr(644,root,root,755)
 %dir %{_sysconfdir}/apache2handler.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
-%attr(755,root,root) %{_libdir}/apache/libphp4.so
-%{_datadir}/apache-icons/*
+%attr(755,root,root) %{_libdir}/apache/libphp4-*.so
 %endif
 
 %if %{with fcgi}
@@ -2673,6 +2734,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*
@@ -3132,11 +3194,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.054005 seconds and 4 git commands to generate.