X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=php.spec;h=7acb9ebd8b86b46b8c4c2a50f95b65d5eac151b8;hb=8936d5854607ff8a48dda03b2a222108d19e9e61;hp=8e74f1b9a29bbc49232e1214bf73f7ae2880028f;hpb=bff85868ec65953b6a325616230612f2bce76058;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index 8e74f1b..7acb9eb 100644 --- a/php.spec +++ b/php.spec @@ -32,6 +32,7 @@ %bcond_with instantclient # build Oracle oci8 extension module against oracle-instantclient package %bcond_with system_gd # with system gd (we prefer internal since it enables few more features) %bcond_with system_libzip # with system libzip (reported broken currently) +%bcond_without default_php # use this PHP as default PHP in distro %bcond_without curl # without CURL extension module %bcond_without filter # without filter extension module %bcond_without enchant # without Enchant extension module @@ -110,15 +111,18 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %undefine with_filter %endif -%define orgname php %if "%{pld_release}" == "ac" -%define php_suffix 53 %define _noautoreqdep libphp_common.* -%else -%define php_suffix %{nil} +# if commandline --with was given. respect that +%if 0%{!?_with_default_php:1} +%undefine with_default_php +%endif %endif %define rel 1 +%define orgname php +%define ver_suffix 53 +%define php_suffix %{!?with_default_php:%{ver_suffix}} Summary: PHP: Hypertext Preprocessor Summary(fr.UTF-8): Le langage de script embarque-HTML PHP Summary(pl.UTF-8): Język skryptowy PHP @@ -126,13 +130,13 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 5.3.26 +Version: 5.3.28 Release: %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci} Epoch: 4 License: PHP Group: Libraries Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2 -# Source0-md5: d71db8d92edbb48beb5b645b55471139 +# Source0-md5: 56ff88934e068d142d6c0deefd1f396b Source2: %{orgname}-mod_%{orgname}.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -189,6 +193,7 @@ Patch44: %{orgname}-include_path.patch Patch45: %{orgname}-imap-annotations.patch Patch46: %{orgname}-imap-myrights.patch Patch47: suhosin.patch +Patch48: php-bug-60598.patch Patch49: %{orgname}-m4-divert.patch Patch50: extension-shared-optional-dep.patch Patch51: spl-shared.patch @@ -203,6 +208,9 @@ Patch64: %{orgname}-m4.patch Patch65: system-libzip.patch Patch66: %{orgname}-db.patch Patch67: php-litespeed.patch +Patch68: mysql-lib-ver-mismatch.patch +Patch69: fpm-conf-split.patch +Patch70: %{orgname}-freetype.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} @@ -306,6 +314,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define jsonver 1.2.1 %define pharver 2.0.1 %define sqlitever 2.0-dev +%define sqlite3ver 0.7-dev %define zipver 1.11.0 %define zend_zts %{!?with_zts:0}%{?with_zts:1} @@ -575,6 +584,7 @@ Obsoletes: php-pear-devel Obsoletes: php4-devel Obsoletes: php52-devel Obsoletes: php54-devel +Obsoletes: php55-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -1619,7 +1629,7 @@ Summary(pl.UTF-8): Moduł SQLite3 dla PHP Group: Libraries URL: http://php.net/manual/en/book.sqlite3.php Requires: %{name}-common = %{epoch}:%{version}-%{release} -Provides: php(sqlite3) +Provides: php(sqlite3) = %{sqlite3ver} %description sqlite3 SQLite is a C library that implements an embeddable SQL database @@ -1945,6 +1955,7 @@ cp -p php.ini-production php.ini %if %{with suhosin} %patch47 -p1 %endif +%patch48 -p1 %patch49 -p1 %patch50 -p1 %patch51 -p1 @@ -1961,6 +1972,9 @@ cp -p php.ini-production php.ini %{__rm} -r sapi/litespeed gzip -dc %{SOURCE15} | tar xf - -C sapi/ %patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4 @@ -2039,6 +2053,12 @@ if test "$ver" != "%{pharver}"; then : Update the pharver macro and rebuild. exit 1 fi +ver=$(sed -n '/#define PHP_SQLITE3_VERSION/{s/.* "//;s/".*$//;p}' ext/sqlite3/php_sqlite3.h) +if test "$ver" != "%{sqlite3ver}"; then + : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}. + : Update the sqlite3ver macro and rebuild. + exit 1 +fi ver=$(sed -n '/#define PHP_ZIP_VERSION_STRING /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h) if test "$ver" != "%{zipver}"; then : Error: Upstream ZIP version is now ${ver}, expecting %{zipver}. @@ -2438,6 +2458,7 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/fpm.d,%{_sbindir},%{_datadir}/fpm} libtool --mode=install install -p sapi/fpm/php-fpm $RPM_BUILD_ROOT%{_sbindir}/%{name}-fpm cp -p sapi/fpm/php-fpm.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}-fpm.8 cp -p sapi/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir} +cp -p sapi/fpm/php-fpm.conf-d $RPM_BUILD_ROOT%{_sysconfdir}/fpm.d/www.conf cp -p sapi/fpm/status.html $RPM_BUILD_ROOT%{_datadir}/fpm install -d $RPM_BUILD_ROOT/etc/rc.d/init.d install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm @@ -2451,7 +2472,7 @@ cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm s#/usr/lib/php#%{php_extensiondir}# s#/etc/php#%{_sysconfdir}# s#@processname@#%{name}-fpm#g -' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf} +' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf,%{_sysconfdir}/fpm.d/www.conf} %endif # install Embedded API @@ -2463,16 +2484,16 @@ cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed %endif # install CLI -# without suffix, install as php.cli -%if "%{?php_suffix}" == "" -%define phpfn %{name}.cli -%else -%define phpfn %{name} +# versioned suffix is always installed +libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{ver_suffix} +cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{ver_suffix}.1 +echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1 +ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php + +# .cli extension is installed only if default php.spec in distro for legacy purposes +%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac" +ln -s php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php.cli %endif -libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/%{phpfn} -cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{phpfn}.1 -echo ".so %{phpfn}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1 -ln -sf %{phpfn} $RPM_BUILD_ROOT%{_bindir}/php cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini @@ -2735,8 +2756,13 @@ fi %defattr(644,root,root,755) %dir %{_sysconfdir}/cli.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini -%attr(755,root,root) %{_bindir}/%{phpfn} -%{_mandir}/man1/%{phpfn}.1* +%attr(755,root,root) %{_bindir}/php%{ver_suffix} +%{_mandir}/man1/php%{ver_suffix}.1* + +# legacy. do we really need it? +%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac" +%attr(755,root,root) %{_bindir}/php.cli +%endif %files program %defattr(644,root,root,755) @@ -2749,6 +2775,7 @@ fi %doc sapi/fpm/{CREDITS,LICENSE} %dir %{_sysconfdir}/fpm.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpm.d/www.conf %attr(755,root,root) %{_sbindir}/%{name}-fpm %{_mandir}/man8/%{name}-fpm.8* %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-fpm @@ -2819,6 +2846,7 @@ fi %files dba %defattr(644,root,root,755) +%doc ext/dba/{CREDITS,README} %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dba.ini %attr(755,root,root) %{php_extensiondir}/dba.so