summaryrefslogtreecommitdiffstats
path: root/php-pecl-yar.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-yar.spec')
-rw-r--r--php-pecl-yar.spec56
1 files changed, 28 insertions, 28 deletions
diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec
index 2cf3bc3..7aedc98 100644
--- a/php-pecl-yar.spec
+++ b/php-pecl-yar.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-yar
#
-# Copyright (c) 2013-2020 Remi Collet
+# Copyright (c) 2013-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -11,6 +11,8 @@
%scl_package php-pecl-yar
%endif
+%bcond_without tests
+
%global gh_commit 0e04a6a92347f7e95c9ddf8bbbad36b6286ed87f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laruence
@@ -18,13 +20,12 @@
#global gh_date 20150914
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name yar
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
# After 40-json, 40-msgpack
%global ini_name 50-%{pecl_name}.ini
Summary: Light, concurrent RPC framework
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.1.2
+Version: 2.2.0
%if 0%{?gh_date:1}
Release: 0.14.%{gh_date}git%{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
@@ -36,8 +37,9 @@ License: PHP
URL: https://pecl.php.net/package/%{pecl_name}
BuildRequires: %{?dtsprefix}gcc
+BuildRequires: make
BuildRequires: curl-devel
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel
@@ -58,26 +60,17 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
%endif
@@ -205,31 +198,35 @@ fi
%check
+DEPS="-n"
+if [ -f %{php_extdir}/json.so ]; then
+DEPS="$DEPS -d extension=json.so"
+fi
+if [ -f %{php_extdir}/msgpack.so ]; then
+DEPS="$DEPS -d extension=msgpack.so"
+fi
+
# fails in mock with: curl exec failed 'Couldn't connect to server'
rm ?TS/tests/022.phpt
: Minimal load test for NTS extension
-%{__php} --no-php-ini \
- --define extension=json.so \
- --define extension=msgpack.so \
- --define extension=NTS/modules/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+%{__php} $DEPS \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
- --define extension=json.so \
- --define extension=msgpack.so \
- --define extension=ZTS/modules/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+%{__ztsphp} $DEPS \
+ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
+ --modules | grep '^%{pecl_name}$'
%endif
-%if %{with_tests}
+%if %{with tests}
cd NTS
: Create test configuration
export TEST_PHP_EXECUTABLE=%{__php}
-export TEST_PHP_ARGS="-n -d extension=json.so -d extension=msgpack.so -d extension=$PWD/modules/%{pecl_name}.so"
+export TEST_PHP_ARGS="$DEPS -d extension=$PWD/modules/%{pecl_name}.so"
export NO_INTERACTION=1
export REPORT_EXIT_STATUS=1
export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
@@ -258,6 +255,9 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR
%changelog
+* Tue Jan 5 2021 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+
* Tue Mar 31 2020 Remi Collet <remi@remirepo.net> - 2.1.2-1
- update to 2.1.2