From e890e74aac4f78084ee3e3a311cc8c54b6a95677 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Jun 2015 11:02:36 +0200 Subject: php-pecl-yaf: rebuild for "rh-php56" --- php-pecl-yaf.spec | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec index a5ce7b7..70a6fe8 100644 --- a/php-pecl-yaf.spec +++ b/php-pecl-yaf.spec @@ -6,6 +6,14 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%endif + %{?scl: %scl_package php-pecl-yaf} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} @@ -20,9 +28,9 @@ %endif Summary: Yet Another Framework -Name: %{?scl_prefix}php-pecl-yaf +Name: %{?sub_prefix}php-pecl-yaf Version: 2.3.3 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/yaf @@ -34,8 +42,6 @@ BuildRequires: %{?scl_prefix}php-devel >= 5.2.0 BuildRequires: %{?scl_prefix}php-pear BuildRequires: pcre-devel -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -72,7 +78,7 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} The Yet Another Framework (Yaf) extension is a PHP framework that is used to develop web applications. -Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. %prep @@ -162,12 +168,20 @@ REPORT_EXIT_STATUS=1 \ %endif -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi %postun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -191,6 +205,10 @@ rm -rf %{buildroot} %changelog +* Wed Jun 24 2015 Remi Collet - 2.3.3-2 +- allow build against rh-php56 (as more-php56) +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet - 2.3.3-1.1 - Fedora 21 SCL mass rebuild -- cgit