From 0368345de273f7cc66f02366600467408e0f9848 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 23 Jun 2015 07:21:07 +0200 Subject: php-judy: allow build against rh-php56 (as more-php56) --- php-pecl-judy.spec | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/php-pecl-judy.spec b/php-pecl-judy.spec index f405e97..01892af 100644 --- a/php-pecl-judy.spec +++ b/php-pecl-judy.spec @@ -1,4 +1,7 @@ -# spec file for php-pecl-judy +# remirepo spec file for php-pecl-judy +# With SCL stuff, from Fedora: +# +# Fedora spec file for php-pecl-judy # # Copyright (c) 2013-2015 Remi Collet # License: CC-BY-SA @@ -6,6 +9,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-judy} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?php_incldir: %global php_incldir %{_includedir}/php} @@ -22,9 +33,9 @@ %endif Summary: PHP Judy implements sparse dynamic arrays -Name: %{?scl_prefix}php-pecl-judy +Name: %{?sub_prefix}php-pecl-judy Version: 1.0.2 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -36,8 +47,6 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: Judy-devel 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} %if "%{php_version}" < "5.4" @@ -173,12 +182,20 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%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 @@ -220,9 +237,11 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %exclude %{pecl_docdir}/%{pecl_name}/examples %{pecl_xmldir}/%{name}.xml + %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{ext_name}.so @@ -244,6 +263,10 @@ rm -rf %{buildroot} %changelog +* Tue Jun 23 2015 Remi Collet - 1.0.2-4 +- allow build against rh-php56 (as more-php56) +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet - 1.0.2-3.1 - Fedora 21 SCL mass rebuild -- cgit