diff options
Diffstat (limited to 'php-pecl-yar.spec')
-rw-r--r-- | php-pecl-yar.spec | 111 |
1 files changed, 57 insertions, 54 deletions
diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec index d661529..07a8b8d 100644 --- a/php-pecl-yar.spec +++ b/php-pecl-yar.spec @@ -1,16 +1,17 @@ # remirepo spec file for php-pecl-yar # -# Copyright (c) 2013-2020 Remi Collet +# Copyright (c) 2013-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-yar %endif +%bcond_without tests + %global gh_commit 0e04a6a92347f7e95c9ddf8bbbad36b6286ed87f %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laruence @@ -18,34 +19,31 @@ #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} -%if "%{php_version}" < "5.6" -# After json, msgpack -%global ini_name %{pecl_name}.ini -%else # After 40-json, 40-msgpack %global ini_name 50-%{pecl_name}.ini -%endif Summary: Light, concurrent RPC framework -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 2.1.1 +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 2.3.2 %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 %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif License: PHP URL: https://pecl.php.net/package/%{pecl_name} +Patch0: %{pecl_name}-php82.patch + 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 +BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -58,32 +56,6 @@ 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 "%{?vendor}" == "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 -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -108,6 +80,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr177 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_YAR_VERSION/{s/.* "//;s/".*$//;p}' php_yar.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}%{?gh_date:-dev}"; then @@ -137,7 +111,6 @@ extension=%{pecl_name}.so ;yar.expose_info=On ;yar.packager=msgpack ;yar.timeout=5000 -;yar.transport=curl EOF @@ -210,37 +183,40 @@ 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 NO_INTERACTION=1 +export TEST_PHP_ARGS="$DEPS -d extension=$PWD/modules/%{pecl_name}.so" 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};') : Run the upstream test suite -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %else : upstream test suite disabled %endif @@ -263,6 +239,33 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR %changelog +* Mon Oct 3 2022 Remi Collet <remi@remirepo.net> - 2.3.2-2 +- add patch for PHP 8.2 from + https://github.com/laruence/yar/pull/177 + +* Wed May 18 2022 Remi Collet <remi@remirepo.net> - 2.3.2-1 +- update to 2.3.2 + +* Mon May 9 2022 Remi Collet <remi@remirepo.net> - 2.3.1-1 +- update to 2.3.1 +- drop patch merged upstream + +* Thu May 5 2022 Remi Collet <remi@remirepo.net> - 2.3.0-2 +- add fix for https://github.com/laruence/yar/issues/172 + using patch from https://github.com/laruence/yar/pull/174 + +* Mon Apr 25 2022 Remi Collet <remi@remirepo.net> - 2.3.0-1 +- update to 2.3.0 + +* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 2.2.1-1 +- update to 2.2.1 + +* 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 + * Mon Mar 16 2020 Remi Collet <remi@remirepo.net> - 2.1.1-1 - update to 2.1.1 - drop patches merged upstream |