summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-12-24 11:00:40 +0100
committerRemi Collet <fedora@famillecollet.com>2014-12-24 11:00:40 +0100
commit2c18855728d9415a05464c595b1db5afe1defcda (patch)
tree23a4f0827275997e20abb2e16959ad7eab4326b3
parent6cc21510c99b075614f64f73ba6c41f67fef80c5 (diff)
php-pecl-jsond: fix scriptlets
-rw-r--r--php-pecl-jsond.spec16
1 files 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