From 2c18855728d9415a05464c595b1db5afe1defcda Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Dec 2014 11:00:40 +0100 Subject: php-pecl-jsond: fix scriptlets --- php-pecl-jsond.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/php-pecl-jsond.spec b/php-pecl-jsond.spec index 65e2222..d3d7e55 100644 --- a/php-pecl-jsond.spec +++ b/php-pecl-jsond.spec @@ -150,12 +150,20 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%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} %{pecl_name} >/dev/null || : fi -- cgit