X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=php.spec;h=954fd29b25cb7e89a4ad8cf8b4c13310e46d0c5f;hb=refs%2Fheads%2FPHP_7_0;hp=cadf8afef6ad4bb407fff319f4649006887ec436;hpb=af4b4043e31c73aa2409a03c8bea8215f9e36b7d;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index cadf8af..954fd29 100644 --- a/php.spec +++ b/php.spec @@ -142,8 +142,8 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 7.0.15 -Release: 1.1 +Version: 7.0.33 +Release: 1 Epoch: 4 # All files licensed under PHP version 3.01, except # Zend is licensed under Zend @@ -151,7 +151,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: dca23412f3e3b3987e582091b751925d +# Source0-md5: a6d7c355d023301a1a9ec8b4f32a4856 Source2: %{orgname}-mod_php.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -199,7 +199,6 @@ Patch52: pcre-shared.patch Patch53: fix-test-run.patch Patch55: bug-52078-fileinode.patch Patch59: %{orgname}-systzdata.patch -Patch60: %{orgname}-oracle-instantclient.patch Patch62: mcrypt-libs.patch Patch65: system-libzip.patch Patch66: php-db.patch @@ -284,8 +283,8 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define php_sysconfdir /etc/%{name} %define php_extensiondir %{_libdir}/%{name} -%define php_datadir /usr/share/%{name} -%define _sysconfdir %{php_sysconfdir} +%define php_datadir /usr/share/php/%{name} +%define _sysconfdir %{php_sysconfdir} # must be in sync with source. extra check ensuring that it is so is done in %%build %define php_api_version 20151012 @@ -295,13 +294,13 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # Extension versions %define bz2ver 1.0 -%define enchantver 1.1.0 +%define enchantver %{version} %define fileinfover 1.0.5 %define hashver 1.0 %define intlver 1.1.0 %define jsonver 1.4.0 %define pharver 2.0.2 -%define sqlite3ver 0.7-dev +%define sqlite3ver %{version} %define zipver 1.13.5 %define phpdbgver 0.5.0 @@ -571,7 +570,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 @@ -1964,7 +1962,6 @@ cp -p php.ini-production php.ini %undos ext/spl/tests/SplFileInfo_getInode_basic.phpt %patch55 -p1 %patch59 -p1 -%patch60 -p1 %patch62 -p1 %{?with_system_libzip:%patch65 -p1} %patch66 -p1 @@ -2112,10 +2109,8 @@ 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. +ver=$(awk '/#define PHP_SQLITE3_VERSION/ {print $3}' ext/sqlite3/php_sqlite3.h | xargs) +if test "$ver" != "PHP_VERSION"; then exit 1 fi ver=$(sed -n '/#define PHP_ZIP_VERSION /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h) @@ -2142,10 +2137,8 @@ if test "$ver" != "%{bz2ver}"; then : Update the bz2ver macro and rebuild. exit 1 fi -ver=$(sed -n '/#define PHP_ENCHANT_VERSION /{s/.* "//;s/".*$//;p}' ext/enchant/php_enchant.h) -if test "$ver" != "%{enchantver}"; then - : Error: Upstream Enchant version is now ${ver}, expecting %{enchantver}. - : Update the enchantver macro and rebuild. +ver=$(awk '/#define PHP_ENCHANT_VERSION/ {print $3}' ext/enchant/php_enchant.h | xargs) +if test "$ver" != "PHP_VERSION"; then exit 1 fi ver=$(awk '/#define PHP_HASH_VERSION/ {print $3}' ext/hash/php_hash.h | xargs) @@ -2511,9 +2504,12 @@ v=$(echo %{version} | cut -d. -f1-2) # install Apache2 DSO module %if %{with apache2} +# versioned libphp libtool --mode=install install -p sapi/apache2handler/libphp7.la $RPM_BUILD_ROOT%{_libdir}/apache -%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp7{,-$v}.so -ln -s libphp7-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so +%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp7.la $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la +%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp7.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.so +sed -i -e "s|libphp7|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 @@ -2538,7 +2534,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} @@ -2575,11 +2577,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/libphp7.so $RPM_BUILD_ROOT%{_libdir} +install -p libs/libphp7.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 @@ -2590,7 +2593,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/libphp7.la +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la %endif # ensure that paths are correct for current php version and arch @@ -2635,9 +2638,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 @@ -2659,9 +2662,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} \ @@ -2672,8 +2678,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 @@ -2688,7 +2694,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 @@ -2851,7 +2857,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} @@ -2861,7 +2867,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/libphp7-*.*.so +%attr(755,root,root) %{_libdir}/apache/libphp%{php_suffix}.so %endif %if %{with litespeed} @@ -2882,7 +2888,7 @@ fi %if %{with embed} %files embedded %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libphp7.so +%attr(755,root,root) %{_libdir}/libphp%{php_suffix}.so %endif %files cli @@ -2927,7 +2933,8 @@ 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} %doc ext/session/mod_files.sh @@ -2939,8 +2946,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*