summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-msgpack.spec75
2 files changed, 56 insertions, 21 deletions
diff --git a/REFLECTION b/REFLECTION
index a1503c1..51a50c1 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #108 msgpack version 0.5.5 ] {
+Extension [ <persistent> extension #124 msgpack version 0.5.6 ] {
- INI {
Entry [ msgpack.error_display <ALL> ]
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec
index aa51d6c..494d7bb 100644
--- a/php-pecl-msgpack.spec
+++ b/php-pecl-msgpack.spec
@@ -19,10 +19,16 @@
%global ini_name 40-%{pecl_name}.ini
%endif
+%if 0
+%global with_msgpack 1
+%else
+%global with_msgpack 0
+%endif
+
Summary: API for communicating with MessagePack serialization
Name: %{?scl_prefix}php-pecl-msgpack
-Version: 0.5.5
-Release: 8%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Version: 0.5.6
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/msgpack
@@ -34,14 +40,12 @@ Patch0: %{pecl_name}.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
-%if 0%{?fedora} > 15 || 0%{?rhel} > 6
+%if %{with_msgpack}
BuildRequires: msgpack-devel
%endif
# https://github.com/msgpack/msgpack-php/issues/25
ExcludeArch: ppc64
-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}}
@@ -53,17 +57,21 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name}
-Obsoletes: php53u-pecl-%{pecl_name}
-Obsoletes: php54-pecl-%{pecl_name}
-Obsoletes: php54w-pecl-%{pecl_name}
+Obsoletes: php53-pecl-%{pecl_name} <= %{version}
+Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name}
-Obsoletes: php55w-pecl-%{pecl_name}
+Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name}
-Obsoletes: php56w-pecl-%{pecl_name}
+Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "7.0"
+Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -89,6 +97,8 @@ a perfect replacement.
This extension is still EXPERIMENTAL.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}.
+
%package devel
Summary: MessagePack developer files (header)
@@ -107,7 +117,7 @@ mv %{pecl_name}-%{version} NTS
cd NTS
%patch0 -p1 -b .build
-%if 0%{?fedora} > 15 || 0%{?rhel} > 6
+%if %{with_msgpack}
# use system library
rm -rf msgpack
%endif
@@ -116,7 +126,7 @@ rm -rf msgpack
[ -f EXPERIMENTAL ] || exit 1
# Sanity check, really often broken
-extver=$(sed -n '/#define MSGPACK_EXTENSION_VERSION/{s/.* "//;s/".*$//;p}' php_msgpack.h)
+extver=$(sed -n '/#define PHP_MSGPACK_VERSION/{s/.* "//;s/".*$//;p}' php_msgpack.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}.
exit 1
@@ -181,31 +191,52 @@ done
%check
+# Known by upstream as failed test (travis result)
+rm */tests/{018,030,040b,040c,040d}.phpt
+
cd NTS
+: Minimal load test for NTS extension
+%{__php} --no-php-ini \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --modules | grep %{pecl_name}
+: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php
+%{__php} -n run-tests.php --show-diff
%if %{with_zts}
cd ../ZTS
+: Minimal load test for ZTS extension
+%{__ztsphp} --no-php-ini \
+ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
+ --modules | grep %{pecl_name}
+: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__ztsphp} -n run-tests.php --show-diff
%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
@@ -239,6 +270,10 @@ rm -rf %{buildroot}
%changelog
+* Mon Apr 27 2015 Remi Collet <remi@fedoraproject.org> - 0.5.6-1
+- Update to 0.5.6
+- drop runtime dependency on pear, new scriptlets
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.5.5-8.1
- Fedora 21 SCL mass rebuild