summaryrefslogtreecommitdiffstats
path: root/php-pecl-pthreads.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-09-10 20:19:49 +0200
committerRemi Collet <fedora@famillecollet.com>2015-09-10 20:19:49 +0200
commitce6061d15c3bc2c7f6f29ef65302318c347b463d (patch)
tree890ef3dc207ce020db48ff446de7339631cd2b59 /php-pecl-pthreads.spec
parentf4bdbf56f94fef939ecf5fb51c8fe915d5ad3db1 (diff)
php-pecl-pthreads: 3.0.0 (for php 7)
Diffstat (limited to 'php-pecl-pthreads.spec')
-rw-r--r--php-pecl-pthreads.spec22
1 files changed, 14 insertions, 8 deletions
diff --git a/php-pecl-pthreads.spec b/php-pecl-pthreads.spec
index bf0fdd8..e246901 100644
--- a/php-pecl-pthreads.spec
+++ b/php-pecl-pthreads.spec
@@ -21,7 +21,7 @@
Summary: Threading API
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 2.0.10
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -31,8 +31,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-zts-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
-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}}
@@ -66,13 +64,13 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
%description
-A compatible Threading API for PHP5.3+
+A compatible Threading API for PHP.
Documentation: http://php.net/pthreads
This extension is only available for PHP in ZTS mode.
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
%prep
@@ -126,12 +124,20 @@ do sed -e 's/\r//' -i $i
done
-%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