From a975f8297a93967a653c566b2351280434ac8023 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Dec 2014 11:00:12 +0100 Subject: php-pecl-jsonc: fix scriptlets --- php-pecl-jsonc.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/php-pecl-jsonc.spec b/php-pecl-jsonc.spec index 8438ccb..3f93426 100644 --- a/php-pecl-jsonc.spec +++ b/php-pecl-jsonc.spec @@ -242,12 +242,20 @@ REPORT_EXIT_STATUS=1 \ %endif -%triggerin -- php-pear -%{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 -%triggerun -- php-pear -if [ $1 -eq 0 -o $2 -eq 0 ] ; then +%postun +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{proj_name} >/dev/null || : fi -- cgit