summaryrefslogtreecommitdiffstats
path: root/php-pecl-msgpack.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-msgpack.spec')
-rw-r--r--php-pecl-msgpack.spec41
1 files changed, 22 insertions, 19 deletions
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec
index 5d93e3b..ed6bd23 100644
--- a/php-pecl-msgpack.spec
+++ b/php-pecl-msgpack.spec
@@ -3,14 +3,13 @@
#
# Fedora spec file for php-pecl-msgpack
#
-# Copyright (c) 2012-2021 Remi Collet
+# Copyright (c) 2012-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
%scl_package php-pecl-msgpack
%endif
@@ -27,14 +26,14 @@
%global upstream_prever RC1
%global upstream_lower RC1
-%if 0
-%global with_msgpack 1
-%else
-%global with_msgpack 0
-%endif
+# to use system library
+%bcond_with msgpack
+
+# to disable test suite
+%bcond_without tests
Summary: API for communicating with MessagePack serialization
-Name: %{?sub_prefix}php-pecl-msgpack
+Name: %{?scl_prefix}php-pecl-msgpack
License: BSD
Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}}
URL: https://pecl.php.net/package/msgpack
@@ -42,7 +41,7 @@ URL: https://pecl.php.net/package/msgpack
Release: 0.7.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
@@ -50,7 +49,7 @@ BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
-%if %{with_msgpack}
+%if %{with msgpack}
BuildRequires: msgpack-devel
%else
Provides: bundled(msgpack) = 3.2.0
@@ -64,10 +63,7 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
+
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
%if "%{php_version}" > "7.3"
@@ -105,10 +101,6 @@ Summary: MessagePack developer files (header)
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{?scl_prefix}php-devel%{?_isa}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel%{?_isa} = %{version}-%{release}
-%endif
%description devel
@@ -128,7 +120,7 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
-%if %{with_msgpack}
+%if %{with msgpack}
# use system library
rm -rf msgpack
%endif
@@ -205,6 +197,10 @@ done
%check
# Erratic results, segfauilt and mark as XFAIL
rm */tests/034.phpt
+%ifarch aarch64
+# too slow
+rm */tests/035.phpt
+%endif
cd NTS
: Minimal load test for NTS extension
@@ -212,11 +208,13 @@ cd NTS
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
+%endif
%if %{with_zts}
cd ../ZTS
@@ -225,12 +223,14 @@ cd ../ZTS
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q --show-diff
%endif
+%endif
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
@@ -277,6 +277,9 @@ fi
%changelog
+* Thu Jul 28 2022 Remi Collet <remi@remirepo.net> - 2.2.0~RC1-7
+- skip one test on aarch64
+
* Mon Sep 6 2021 Remi Collet <remi@remirepo.net> - 2.2.0~RC1-6
- F35 build