diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-12-24 11:00:24 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-12-24 11:00:24 +0100 |
commit | 9436c6f388b15ddefd800ed7968040d7f0ba8dab (patch) | |
tree | eb0e9969a1e0b5cb16247ef82c45662fd26d8c3e | |
parent | 7df0ab049a2a45a2a72d032c01afdbe63056af17 (diff) |
php-pecl-zip: fix scriptlets
-rw-r--r-- | php-pecl-zip.spec | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec index 7a79671..05c4ad2 100644 --- a/php-pecl-zip.spec +++ b/php-pecl-zip.spec @@ -6,7 +6,8 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-zip} +%{?scl: %scl_package php-pecl-zip} +%{!?__pecl: %global __pecl %{_bindir}/pecl} %global with_zts 0%{?__ztsphp:1} %global pecl_name zip @@ -201,13 +202,20 @@ TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ %clean rm -rf %{buildroot} +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi -%triggerin -- php-pear -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : - +# 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 |