diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-12-24 11:00:12 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-12-24 11:00:12 +0100 |
commit | a975f8297a93967a653c566b2351280434ac8023 (patch) | |
tree | aae4214e6bf0f0fb93f668d5f52c71c9439856bb | |
parent | 3cfc1f5ac2ecfc67478fc85eb7206978a7438839 (diff) |
php-pecl-jsonc: fix scriptlets
-rw-r--r-- | php-pecl-jsonc.spec | 16 |
1 files 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 |