X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=php.spec;h=f32db3a9cb6aaf1efc98c5924badc341c7aa82be;hb=refs%2Fheads%2FPHP_5_6;hp=d5dbccaada46e2d777fff712c1a75a01aa55e1db;hpb=4747f5dfd0b93ff510b9242a019b648a437093a9;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index d5dbcca..f32db3a 100644 --- a/php.spec +++ b/php.spec @@ -148,7 +148,7 @@ 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.6.32 +Version: 5.6.40 Release: 1 Epoch: 4 # All files licensed under PHP version 3.01, except @@ -157,7 +157,7 @@ Epoch: 4 License: PHP 3.01 and Zend and BSD Group: Libraries Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.xz -# Source0-md5: 660cd5bc0f16eaad655b7815c757aadc +# Source0-md5: c7dde3afb16ce7b761abf2805125d372 Source2: %{orgname}-mod_%{orgname}.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -266,7 +266,6 @@ BuildRequires: openssl-devel >= 0.9.7d BuildRequires: pam-devel %{?with_pcre:BuildRequires: pcre-devel >= 8.10} BuildRequires: pkgconfig -%{?with_pgsql:BuildRequires: postgresql-backend-devel >= 7.2} %{?with_pgsql:BuildRequires: postgresql-devel} BuildRequires: readline-devel %{?with_recode:BuildRequires: recode-devel >= 3.5d-3} @@ -583,7 +582,6 @@ Requires: libtool >= 2:2.4.6 %{?with_pcre:Requires: pcre-devel >= 8.10} Requires: shtool Provides: php-devel = %{epoch}:%{version}-%{release} -Obsoletes: php-devel Obsoletes: php-pear-devel Obsoletes: php4-devel Obsoletes: php52-devel @@ -2431,7 +2429,6 @@ for sapi in $sapis; do cp -f main/php_config.h php_config.h.$sapi cp -f config.log config.log.$sapi done - # as we build each SAPI in own make, adjust php-config.in forehead sapis=$(%{__sed} -rne 's/^PHP_INSTALLED_SAPIS = (.+)/\1/p' Makefile.* | tr ' ' '\n' | sort -u | xargs) %{__sed} -i -e "s,@PHP_INSTALLED_SAPIS@,$sapis," scripts/php-config.in @@ -2592,9 +2589,12 @@ v=$(echo %{version} | cut -d. -f1-2) # install Apache2 DSO module %if %{with apache2} +# versioned libphp libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache -%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so -ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so +%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la +%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.so +sed -i -e "s|libphp5|libphp%{php_suffix}|g" $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la +ln -s libphp%{php_suffix}.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so %endif # install litespeed sapi @@ -2619,7 +2619,13 @@ touch $RPM_BUILD_ROOT%{_mandir}/man1/php-config.1 INSTALL_ROOT=$RPM_BUILD_ROOT %endif +# versioned libphp_common libtool --mode=install install -p libphp_common.la $RPM_BUILD_ROOT%{_libdir} +%{__mv} $RPM_BUILD_ROOT%{_libdir}/libphp_common.la $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la +%{__mv} $RPM_BUILD_ROOT%{_libdir}/libphp_common-%{version}.so $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}-%{version}.so +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/libphp_common.so +ln -s libphp_common%{php_suffix}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.so +sed -i -e "s|libphp_common|libphp_common%{php_suffix}|g" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la # install CGI/FCGI %if %{with cgi} @@ -2656,11 +2662,12 @@ touch $RPM_BUILD_ROOT%{_sbindir}/php-fpm # we could use install-headers from Makefile.embed, but that would reinstall all headers # install-sapi installs to wrong dir, so just do it all manually install -d $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/sapi/embed -install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir} +install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/libphp%{php_suffix}.so cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/sapi/embed %endif # CLI +libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{php_suffix} # touch for ghost touch $RPM_BUILD_ROOT%{_bindir}/php touch $RPM_BUILD_ROOT%{_mandir}/man1/php.1 @@ -2671,7 +2678,7 @@ cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini %if %{with apache2} cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/conf.d/70_mod_php.conf cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini -%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la %endif # ensure that paths are correct for current php version and arch @@ -2716,9 +2723,9 @@ install -p run-tests.php $RPM_BUILD_ROOT%{php_datadir}/tests/php/run-tests.php cp -a tests/* $RPM_BUILD_ROOT%{php_datadir}/tests/php # fix install paths, avoid evil rpaths -sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la +sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la # better solution? -sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4 +sed -i -e 's|libphp_common.la|$(libdir)/libphp_common%{php_suffix}.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4 %clean rm -rf $RPM_BUILD_ROOT @@ -2740,9 +2747,12 @@ update-alternatives \ %postun cli if [ $1 -eq 0 ]; then - update-alternatives --remove php %{_bindir}/php || : + update-alternatives --remove php %{_bindir}/php%{php_suffix} || : fi +%post common -p /sbin/ldconfig +%postun common -p /sbin/ldconfig + %post devel update-alternatives \ --install %{_bindir}/phpize phpize %{_bindir}/phpize%{php_suffix} %{php_suffix} \ @@ -2753,8 +2763,8 @@ update-alternatives \ %postun devel if [ $1 -eq 0 ]; then - update-alternatives --remove phpize %{_bindir}/phpize || : - update-alternatives --remove php-config %{_bindir}/php-config || : + update-alternatives --remove phpize %{_bindir}/phpize%{php_suffix} || : + update-alternatives --remove php-config %{_bindir}/php-config%{php_suffix} || : fi %pre fpm @@ -2769,7 +2779,7 @@ update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{php_s if [ "$1" = "0" ]; then %service %{name}-fpm stop /sbin/chkconfig --del %{name}-fpm - update-alternatives --remove php-fpm %{_sbindir}/php-fpm || : + update-alternatives --remove php-fpm %{_sbindir}/php%{php_suffix}-fpm || : fi %postun fpm @@ -2935,7 +2945,7 @@ update-alternatives \ %postun phar %ext_postun if [ $1 -eq 0 ]; then - update-alternatives --remove phar %{_bindir}/phar || : + update-alternatives --remove phar %{_bindir}/phar%{php_suffix}.phar || : fi %if %{with apache2} @@ -2945,7 +2955,7 @@ fi %dir %{_sysconfdir}/apache2handler.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini %attr(755,root,root) %{_libdir}/apache/mod_php.so -%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so +%attr(755,root,root) %{_libdir}/apache/libphp%{php_suffix}.so %endif %if %{with litespeed} @@ -2966,7 +2976,7 @@ fi %if %{with embed} %files embedded %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libphp5.so +%attr(755,root,root) %{_libdir}/libphp%{php_suffix}.so %endif %files cli @@ -3011,7 +3021,7 @@ fi %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini -%attr(755,root,root) %{_libdir}/libphp_common-*.so +%attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}-*.so %dir %{php_datadir} %dir %{php_extensiondir} @@ -3024,8 +3034,8 @@ fi %attr(755,root,root) %{_bindir}/php-config%{php_suffix} %ghost %{_bindir}/phpize %ghost %{_bindir}/php-config -%attr(755,root,root) %{_libdir}/libphp_common.so -%{_libdir}/libphp_common.la +%attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}.so +%{_libdir}/libphp_common%{php_suffix}.la %{_includedir}/php/php%{php_suffix} %{_libdir}/%{name}/build %{_mandir}/man1/php-config%{php_suffix}.1*