|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# Fedora spec file for php-pecl-msgpack
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2012-2018 Remi Collet
|
|
|
|
|
# Copyright (c) 2012-2020 Remi Collet
|
|
|
|
|
# License: CC-BY-SA
|
|
|
|
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
|
#
|
|
|
|
@ -10,33 +10,32 @@
|
|
|
|
|
# we don't want -z defs linker flag
|
|
|
|
|
%undefine _strict_symbol_defs_build
|
|
|
|
|
|
|
|
|
|
%global upstream_version 2.1.2
|
|
|
|
|
#global upstream_prever beta1
|
|
|
|
|
#global upstream_lower beta1
|
|
|
|
|
|
|
|
|
|
%global pecl_name msgpack
|
|
|
|
|
%global with_zts 0%{?__ztsphp:1}
|
|
|
|
|
%global ini_name 40-%{pecl_name}.ini
|
|
|
|
|
# system library is outdated, and bundled library includes not yet released changes
|
|
|
|
|
# e.g. missing template_callback_str in 1.4.1
|
|
|
|
|
# BTW, only pack_template.h and unpack_template.h headers are used
|
|
|
|
|
%global with_msgpack 0
|
|
|
|
|
|
|
|
|
|
Summary: API for communicating with MessagePack serialization
|
|
|
|
|
Name: php-pecl-msgpack
|
|
|
|
|
Version: 2.0.2
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}}
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
|
|
|
|
|
License: BSD
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
URL: http://pecl.php.net/package/msgpack
|
|
|
|
|
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
|
|
|
|
|
|
|
|
|
|
Patch0: %{pecl_name}-pr118.patch
|
|
|
|
|
URL: https://pecl.php.net/package/msgpack
|
|
|
|
|
|
|
|
|
|
BuildRequires: php-devel > 7
|
|
|
|
|
BuildRequires: php-pear
|
|
|
|
|
%if %{with_msgpack}
|
|
|
|
|
BuildRequires: msgpack-devel
|
|
|
|
|
%else
|
|
|
|
|
Provides: bundled(msgpack)
|
|
|
|
|
Provides: bundled(msgpack) = 3.2.0
|
|
|
|
|
%endif
|
|
|
|
|
# https://github.com/msgpack/msgpack-php/issues/25
|
|
|
|
|
ExcludeArch: ppc64
|
|
|
|
|
|
|
|
|
|
Requires: php(zend-abi) = %{php_zend_api}
|
|
|
|
|
Requires: php(api) = %{php_core_api}
|
|
|
|
@ -65,7 +64,6 @@ This extension is still EXPERIMENTAL.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: MessagePack developer files (header)
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: php-devel%{?_isa}
|
|
|
|
|
|
|
|
|
@ -74,14 +72,12 @@ These are the files needed to compile programs using MessagePack serializer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c
|
|
|
|
|
%setup -qc
|
|
|
|
|
mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
|
|
|
|
|
|
|
|
|
|
mv %{pecl_name}-%{version} NTS
|
|
|
|
|
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
|
|
|
|
|
|
|
|
|
|
cd NTS
|
|
|
|
|
%patch0 -p1 -b .pr118
|
|
|
|
|
|
|
|
|
|
%if %{with_msgpack}
|
|
|
|
|
# use system library
|
|
|
|
|
rm -rf msgpack
|
|
|
|
@ -92,8 +88,8 @@ rm -rf msgpack
|
|
|
|
|
|
|
|
|
|
# Sanity check, really often broken
|
|
|
|
|
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}.
|
|
|
|
|
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then
|
|
|
|
|
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:-dev}.
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
@ -147,7 +143,8 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
# Test & Documentation
|
|
|
|
|
cd NTS
|
|
|
|
|
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
|
|
|
|
|
do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
|
|
|
|
|
do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i
|
|
|
|
|
[ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
|
|
|
|
|
done
|
|
|
|
|
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
|
|
|
|
|
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
|
|
|
|
@ -157,11 +154,7 @@ done
|
|
|
|
|
%check
|
|
|
|
|
# Erratic results
|
|
|
|
|
rm */tests/034.phpt
|
|
|
|
|
# Benchmark failing on slow arm builder
|
|
|
|
|
rm */tests/035.phpt
|
|
|
|
|
# Known by upstream as failed test (travis result)
|
|
|
|
|
rm */tests/041.phpt
|
|
|
|
|
rm */tests/040*.phpt
|
|
|
|
|
|
|
|
|
|
cd NTS
|
|
|
|
|
: Minimal load test for NTS extension
|
|
|
|
@ -173,7 +166,7 @@ cd NTS
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{_bindir}/php \
|
|
|
|
|
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
REPORT_EXIT_STATUS=1 \
|
|
|
|
|
REPORT_EXIT_STATUS=0 \
|
|
|
|
|
%{_bindir}/php -n run-tests.php --show-diff
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
@ -187,7 +180,7 @@ cd ../ZTS
|
|
|
|
|
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 \
|
|
|
|
|
REPORT_EXIT_STATUS=0 \
|
|
|
|
|
%{__ztsphp} -n run-tests.php --show-diff
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -216,6 +209,21 @@ REPORT_EXIT_STATUS=1 \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 2.1.2-1
|
|
|
|
|
- update to 2.1.2
|
|
|
|
|
|
|
|
|
|
* Mon Aug 10 2020 Remi Collet <remi@remirepo.net> - 2.1.1-1
|
|
|
|
|
- update to 2.1.1
|
|
|
|
|
|
|
|
|
|
* Mon Mar 2 2020 Remi Collet <remi@remirepo.net> - 2.1.0-1
|
|
|
|
|
- update to 2.1.0
|
|
|
|
|
|
|
|
|
|
* Fri Dec 20 2019 Remi Collet <remi@remirepo.net> - 2.1.0~beta1-1
|
|
|
|
|
- update to 2.1.0beta1
|
|
|
|
|
|
|
|
|
|
* Thu Dec 20 2018 Remi Collet <remi@remirepo.net> - 2.0.3-1
|
|
|
|
|
- update to 2.0.3
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|