]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
- it's no longer use with apache only
[packages/php.git] / php.spec
index 6711b1134e7974138f82ff231b05765d2d6bb49c..5002837b60f8014268ece0a1a861472cf7bcd333 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -30,7 +30,7 @@
 %bcond_without mm              # without mm support for session storage
 %bcond_without msession        # without msession extension module
 %bcond_without mssql           # without MS SQL extension module
-%bcond_without mime_magic              # without mime-magic module
+%bcond_without mime_magic      # without mime-magic module
 %bcond_without odbc            # without ODBC extension module
 %bcond_without openssl         # without OpenSSL support and OpenSSL extension (module)
 %bcond_without pcre            # without PCRE extension module
@@ -71,21 +71,21 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %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(ru):   PHP ÷ÅÒÓÉÉ 5 - ÑÚÙË ÐÒÅÐÒÏÃÅÓÓÉÒÏ×ÁÎÉÑ HTML-ÆÁÊÌÏ×, ×ÙÐÏÌÎÑÅÍÙÊ ÎÁ ÓÅÒ×ÅÒÅ
 Summary(uk):   PHP ÷ÅÒÓ¦§ 5 - ÍÏ×Á ÐÒÅÐÒÏÃÅÓÕ×ÁÎÎÑ HTML-ÆÁÊ̦×, ×ÉËÏÎÕ×ÁÎÁ ÎÁ ÓÅÒ×ÅÒ¦
 Name:          php
-Version:       5.1.1
+Version:       5.1.2
 %define        _rel 5
 Release:       %{_rel}%{?with_hardening:hardened}
 Epoch:         4
-Group:         Libraries
 License:       PHP
+Group:         Libraries
 Source0:       http://www.php.net/distributions/%{name}-%{version}.tar.bz2
-# Source0-md5: 70a7c90de182d1a1901c390b844153c7
+# Source0-md5: 79cee17e9db85be878000a2a4198378e
 Source1:       FAQ.%{name}
 Source2:       zend.gif
 Source3:       %{name}-module-install
@@ -105,6 +105,7 @@ Patch5:             %{name}-msession-shared-lib.patch
 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
@@ -122,7 +123,8 @@ Patch26:    %{name}-dba-link.patch
 Patch30:       %{name}-hardening-fix.patch
 Patch31:       %{name}-both-apxs.patch
 Patch32:       %{name}-builddir.patch
-Icon:          php.gif
+Patch33:       %{name}-zlib-for-getimagesize.patch
+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}
@@ -164,7 +166,7 @@ BuildRequires:      libxslt-devel >= 1.0.18
 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
@@ -180,6 +182,7 @@ BuildRequires:      readline-devel
 BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpmbuild(macros) >= 1.238
 %{?with_sqlite:BuildRequires:  sqlite-devel}
+%{?with_sqlite:BuildRequires:  sqlite3-devel}
 BuildRequires: t1lib-devel
 %{?with_tidy:BuildRequires:    tidy-devel}
 %{?with_odbc:BuildRequires:    unixODBC-devel}
@@ -276,14 +279,13 @@ PHP - 
 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
 Provides:      php = %{epoch}:%{version}-%{release}
-Obsoletes:     phpfi
 Obsoletes:     apache-mod_php < 1:4.1.1
+Obsoletes:     phpfi
 
 %description -n apache1-mod_php
 PHP as DSO module for apache 1.3.x.
@@ -297,10 +299,9 @@ Summary(pl):       Modu
 Group:         Development/Languages/PHP
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      apache(modules-api) = %{apache_modules_api}
-Requires:      apache >= 2.2.0
+Requires:      apache-mod_mime
 Provides:      php = %{epoch}:%{version}-%{release}
 Obsoletes:     phpfi
-Obsoletes:     apache-mod_php < 1:4.1.1
 
 %description -n apache-mod_php
 PHP as DSO module for apache 2.x.
@@ -374,8 +375,8 @@ Provides:   %{name}-simplexml = %{epoch}:%{version}-%{release}
 Provides:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      %{name}-standard = %{epoch}:%{version}-%{release}
 Provides:      php(modules_api) = %{php_api_version}
-Provides:      php(zend_module_api) = %{zend_module_api}
 Provides:      php(zend_extension_api) = %{zend_extension_api}
+Provides:      php(zend_module_api) = %{zend_module_api}
 Provides:      php5(debug) = %{php_debug}
 Provides:      php5(thread-safety) = %{zend_zts}
 Obsoletes:     php-pecl-domxml
@@ -1022,6 +1023,22 @@ FreeTDS support.
 Modu³ dla PHP dodaj±cy obs³ugê baz danych FreeTDS za po¶rednictwem
 interfejsu PDO.
 
+%package pdo-firebird
+Summary:       PHP Data Objects (PDO) Firebird support
+Summary(pl):   Modu³ PHP Data Objects (PDO) z obs³ug± Firebirda
+Group:         Libraries
+Requires(post,preun):  %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
+
+%description pdo-firebird
+This is a dynamic shared object (DSO) for PHP that will add PDO
+Firebird support.
+
+%description pdo-firebird -l pl
+Modu³ dla PHP dodaj±cy obs³ugê baz danych Firebird za po¶rednictwem
+interfejsu PDO.
+
 %package pdo-mysql
 Summary:       PHP Data Objects (PDO) MySQL support
 Summary(pl):   Modu³ PHP Data Objects (PDO) z obs³ug± MySQL-a
@@ -1278,6 +1295,7 @@ Summary(pl):      Modu
 Group:         Libraries
 Requires(post,preun):  %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      %{name}-pdo = %{epoch}:%{version}-%{release}
 
 %description sqlite
 SQLite is a C library that implements an embeddable SQL database
@@ -1481,8 +1499,6 @@ Group:            Libraries
 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
 
@@ -1520,6 +1536,7 @@ Modu
 %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
@@ -1544,6 +1561,8 @@ patch -p1 < %{PATCH30} || exit 1
 %endif
 %patch31 -p1
 %patch32 -p1
+%patch33 -p1
+%patch34 -p1
 
 # conflict seems to be resolved by recode patches
 rm -f ext/recode/config9.m4
@@ -1551,6 +1570,21 @@ rm -f ext/recode/config9.m4
 # new apr
 sed -i -e 's#apr-config#apr-1-config#g' sapi/apache*/*.m4
 
+# remove all bundled libraries not to link with them accidentally
+#rm -rf ext/sqlite/libsqlite
+#rm -rf ext/bcmath/libbcmath
+#rm -rf ext/date/lib
+#rm -rf ext/dba/libcdb
+#rm -rf ext/dba/libflatfile
+#rm -rf ext/dba/libinifile
+#rm -rf ext/gd/libgd
+#rm -rf ext/mbstring/libmbfl
+#rm -rf ext/mbstring/oniguruma
+rm -rf ext/pcre/pcrelib
+rm -rf ext/pdo_sqlite/sqlite
+#rm -rf ext/soap/interop
+rm -rf ext/xmlrpc/libxmlrpc
+
 %build
 if API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h) && [ $API != %{php_api_version} ]; then
        echo "Set %%define php_api_version to $API and rerun."
@@ -1626,8 +1660,8 @@ for sapi in $sapis; do
        --with-config-file-scan-dir=%{_sysconfdir}/conf.d \
        --with-exec-dir=%{_bindir} \
        --%{!?debug:dis}%{?debug:en}able-debug \
-       --enable-zend-multibyte \
        %{?with_zts:--enable-maintainer-zts} \
+       --enable-inline-optimization \
        --enable-memory-limit \
        --enable-bcmath=shared \
        --enable-calendar=shared \
@@ -1657,8 +1691,9 @@ for sapi in $sapis; do
        %{?with_oci8:--with-pdo-oci=shared} \
        %{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
        %{?with_pgsql:--with-pdo-pgsql=shared} \
-       %{?with_sqlite:--with-pdo-sqlite=shared} \
+       %{?with_sqlite:--with-pdo-sqlite=shared,/usr} \
        --enable-posix=shared \
+       --enable-reflection \
        --enable-session \
        --enable-shared \
        --enable-shmop=shared \
@@ -1675,7 +1710,7 @@ for sapi in $sapis; do
        --enable-ucd-snmp-hack \
        %{?with_wddx:--enable-wddx=shared} \
        --enable-xml=shared \
-       --with-xmlreader=shared \
+       --enable-xmlreader=shared \
        --with-bz2=shared \
        %{!?with_curl:--without-curl}%{?with_curl:--with-curl=shared} \
        %{?with_db3:--with-db3}%{!?with_db3:--with-db4} \
@@ -1735,8 +1770,6 @@ for sapi in $sapis; do
        --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
 
@@ -1877,15 +1910,6 @@ ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/php/build
 %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}
@@ -1958,16 +1982,17 @@ fi
 [ ! -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}
@@ -2215,6 +2240,12 @@ fi
 %postun pdo-dblib
 %extension_postun
 
+%post pdo-firebird
+%extension_post
+
+%postun pdo-firebird
+%extension_postun
+
 %post pdo-mysql
 %extension_post
 
@@ -2617,6 +2648,12 @@ fi
 %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
@@ -2848,6 +2885,13 @@ fi
 %attr(755,root,root) %{extensionsdir}/pdo_dblib.so
 %endif
 
+%if %{with interbase} && %{without interbase_inst}
+%files pdo-firebird
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_firebird.ini
+%attr(755,root,root) %{extensionsdir}/pdo_firebird.so
+%endif
+
 %files pdo-mysql
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_mysql.ini
@@ -2911,11 +2955,6 @@ fi
 %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
This page took 0.04247 seconds and 4 git commands to generate.