summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-yac.spec23
1 files changed, 16 insertions, 7 deletions
diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec
index 13f6150..6775331 100644
--- a/php-pecl-yac.spec
+++ b/php-pecl-yac.spec
@@ -2,7 +2,7 @@
#
# Copyright (c) 2013-2015 Remi Collet
# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/3.0/
+# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
@@ -24,7 +24,7 @@
Summary: Lockless user data cache
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 0.9.2
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
@@ -38,8 +38,6 @@ BuildRequires: %{?scl_prefix}php-pear
BuildRequires: fastlz-devel
%endif
-Requires(post): %{__pecl}
-Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
@@ -211,12 +209,20 @@ REPORT_EXIT_STATUS=1 \
%endif
-%post
-%{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
%postun
-if [ $1 -eq 0 ] ; then
+if [ $1 -eq 0 -a -x %{__pecl} ] ; then
%{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
@@ -240,6 +246,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Mar 1 2015 Remi Collet <remi@fedoraproject.org> - 0.9.2-2
+- drop runtime dependency on pear, new scriplets
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.9.2-1.1
- Fedora 21 SCL mass rebuild