summaryrefslogtreecommitdiffstats
path: root/php-pecl-strict.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-strict.spec')
-rw-r--r--php-pecl-strict.spec26
1 files changed, 18 insertions, 8 deletions
diff --git a/php-pecl-strict.spec b/php-pecl-strict.spec
index d3a9aed..4c500b0 100644
--- a/php-pecl-strict.spec
+++ b/php-pecl-strict.spec
@@ -1,4 +1,4 @@
-# spec file for php-pecl-strict
+# remirepo spec file for php-pecl-strict
#
# Copyright (c) 2014-2015 Remi Collet
# License: CC-BY-SA
@@ -25,7 +25,7 @@
Summary: Strict scalar parameter type hint
Name: %{?scl_prefix}php-pecl-strict
Version: 0.4.1
-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
URL: http://pecl.php.net/package/%{pecl_name}
@@ -37,8 +37,6 @@ BuildRequires: %{?scl_prefix}php-pear
BuildRequires: Judy-devel
BuildRequires: pcre-devel
-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}}
@@ -100,7 +98,7 @@ cat << 'EOF' | tee NTS/%{ini_name}
%if "%{php_version}" > "5.5"
zend_extension=%{pecl_name}.so
%else
-zend_extension=%{php_ztsextdir}/%{pecl_name}.so
+zend_extension=%{php_extdir}/%{pecl_name}.so
%endif
EOF
@@ -162,12 +160,20 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$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
@@ -226,6 +232,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Jun 2 2015 Remi Collet <remi@fedoraproject.org> - 0.4.1-2
+- drop runtime dependency on pear, new scriptlets
+- fix configuration file for PHP 5.4
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.4.1-1.1
- Fedora 21 SCL mass rebuild