From 0270275b3f46475d427cb51a2cadf7eaa97f9f4f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Oct 2021 15:17:04 +0200 Subject: new package php-pecl-openswoole --- PHPINFO | 6 ++-- REFLECTION | 6 ++-- php-pecl-openswoole.spec | 92 +++++++++++++++++++++--------------------------- 3 files changed, 47 insertions(+), 57 deletions(-) diff --git a/PHPINFO b/PHPINFO index b7eacc3..0fff561 100644 --- a/PHPINFO +++ b/PHPINFO @@ -4,7 +4,7 @@ swoole Swoole => enabled Author => Swoole Team Version => 4.7.1 -Built => Aug 26 2021 00:00:00 +Built => Oct 13 2021 00:00:00 coroutine => enabled with boost asm context trace_log => enabled epoll => enabled @@ -14,13 +14,13 @@ cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled -openssl => OpenSSL 1.1.1k FIPS 25 Mar 2021 +openssl => OpenSSL 1.1.1l FIPS 24 Aug 2021 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled -c-ares => 1.17.0 +c-ares => 1.17.2 zlib => 1.2.11 brotli => E16777225/D16777225 mutex_timedlock => enabled diff --git a/REFLECTION b/REFLECTION index 4d7b0d2..4aa19ff 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #124 swoole version 4.7.1 ] { +Extension [ extension #90 swoole version 4.7.1 ] { - Dependencies { Dependency [ json (Required) ] @@ -248,9 +248,9 @@ Extension [ extension #124 swoole version 4.7.1 ] { Constant [ int SWOOLE_RWLOCK ] { 1 } Constant [ int SWOOLE_SPINLOCK ] { 5 } Constant [ int SWOOLE_TIMER_MIN_MS ] { 1 } - Constant [ float SWOOLE_TIMER_MIN_SEC ] { 0.001 } + Constant [ float SWOOLE_TIMER_MIN_SEC ] { 0,001 } Constant [ int SWOOLE_TIMER_MAX_MS ] { 9223372036854775807 } - Constant [ float SWOOLE_TIMER_MAX_SEC ] { 9.2233720368548E+15 } + Constant [ float SWOOLE_TIMER_MAX_SEC ] { 9,2233720368548E+15 } Constant [ int SWOOLE_DEFAULT_MAX_CORO_NUM ] { 100000 } Constant [ int SWOOLE_CORO_MAX_NUM_LIMIT ] { 9223372036854775807 } Constant [ int SWOOLE_CORO_INIT ] { 0 } diff --git a/php-pecl-openswoole.spec b/php-pecl-openswoole.spec index 4eb8b39..c2e8e18 100644 --- a/php-pecl-openswoole.spec +++ b/php-pecl-openswoole.spec @@ -11,14 +11,14 @@ %undefine _strict_symbol_defs_build %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-swoole4 %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name swoole +%global proj_name openswoole # After 20-sockets, 20-json and 20-mysqlnd -%global ini_name 40-%{pecl_name}.ini +%global ini_name 40-%{proj_name}.ini %bcond_without cares %bcond_without nghttpd2 @@ -33,14 +33,14 @@ Summary: PHP's asynchronous concurrent distributed networking framework -Name: %{?sub_prefix}php-pecl-%{pecl_name}4 +Name: %{?scl_prefix}php-pecl-%{proj_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is ASL 2.0 # Hiredis is BSD License: ASL 2.0 and BSD -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +URL: https://pecl.php.net/package/%{proj_name} +Source0: https://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -72,40 +72,23 @@ Requires: %{?scl_prefix}php-mysqlnd%{?_isa} 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}4 = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release} -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 2 -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}2 < 4 -%endif +Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{proj_name})%{?_isa} = %{version} -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 || "%{php_version}" > "7.3" -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 4 -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}2 < 4 -Provides: %{?scl_prefix}php-pecl-%{pecl_name}2 = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}2%{?_isa} = %{version}-%{release} -%else -# Single version can be installed +# Single version can be installed (same ext name) Conflicts: %{?sub_prefix}php-pecl-%{pecl_name} < 4 Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}2 < 4 -%endif +Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}4 < 5 %if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} +Obsoletes: php74-pecl-%{proj_name} <= %{version} %endif %if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} +Obsoletes: php80-pecl-%{proj_name} <= %{version} %endif %if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} +Obsoletes: php81-pecl-%{proj_name} <= %{version} %endif %endif @@ -138,10 +121,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO Summary: %{name} developer files (header) 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 + +# Single version can be installed (same ext name) +Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}-devel < 4 +Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}2-devel < 4 +Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}4-devel < 5 %description devel These are the files needed to compile programs using %{name}. @@ -149,7 +133,7 @@ These are the files needed to compile programs using %{name}. %prep %setup -q -c -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS +mv %{proj_name}-%{upstream_version}%{?upstream_prever} NTS # Don't install/register tests, install examples as doc @@ -163,6 +147,9 @@ sed \ cd NTS +cp -p thirdparty/hiredis/COPYING hiredis-COPYING +cp -p thirdparty/nghttp2/COPYING nghttp2-COPYING + # Sanity check, really often broken extver=$(sed -n '/#define SWOOLE_VERSION /{s/.* "//;s/".*$//;p}' include/swoole_version.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -178,7 +165,7 @@ cp -pr NTS ZTS # Create configuration file cat << 'EOF' | tee %{ini_name} -; Enable %{pecl_name} extension module +; Enable %{proj_name} extension module extension=%{pecl_name}.so ; Configuration @@ -245,15 +232,15 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test and Documentation for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{proj_name}/$i done for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{proj_name}/$i done # code not compatible with Python 3 -rm %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/swoole_process/echo.py -rm %{buildroot}%{pecl_docdir}/%{pecl_name}/examples/process/echo.py +rm %{buildroot}%{pecl_testdir}/%{proj_name}/tests/swoole_process/echo.py +rm %{buildroot}%{pecl_docdir}/%{proj_name}/examples/process/echo.py %if 0%{?fedora} < 24 && 0%{?rhel} < 8 @@ -271,7 +258,7 @@ fi %postun if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : + %{pecl_uninstall} %{proj_name} >/dev/null || : fi %endif @@ -300,11 +287,11 @@ cd ../ZTS %files %{?_licensedir:%license NTS/LICENSE} -%{?_licensedir:%license NTS/thirdparty/hiredis/COPYING} -%{!?_licensedir:%{pecl_docdir}/%{pecl_name}/LICENSE} -%{!?_licensedir:%{pecl_docdir}/%{pecl_name}/LICENSE} -%doc %{pecl_docdir}/%{pecl_name}/*md -%doc %{pecl_docdir}/%{pecl_name}/CREDITS +%{?_licensedir:%license NTS/*-COPYING} +%{!?_licensedir:%{pecl_docdir}/%{proj_name}/LICENSE} +%{!?_licensedir:%{pecl_docdir}/%{proj_name}/thirdparty/*/COPYING} +%doc %{pecl_docdir}/%{proj_name}/*md +%doc %{pecl_docdir}/%{proj_name}/CREDITS %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -317,11 +304,11 @@ cd ../ZTS %files devel -%doc %{pecl_testdir}/%{pecl_name} -%doc %{pecl_docdir}/%{pecl_name}/examples -%doc %{pecl_docdir}/%{pecl_name}/gdbinit -%doc %{pecl_docdir}/%{pecl_name}/thirdparty -%doc %{pecl_docdir}/%{pecl_name}/travis +%doc %{pecl_testdir}/%{proj_name} +%doc %{pecl_docdir}/%{proj_name}/examples +%doc %{pecl_docdir}/%{proj_name}/gdbinit +%doc %{pecl_docdir}/%{proj_name}/thirdparty +%doc %{pecl_docdir}/%{proj_name}/travis %{php_incldir}/ext/%{pecl_name} %if %{with_zts} @@ -330,6 +317,9 @@ cd ../ZTS %changelog +* Wed Oct 13 2021 Remi Collet - 4.7.1-1 +- new package php-pecl-openswoole + * Wed Sep 01 2021 Remi Collet - 4.7.1-2 - rebuild for 8.1.0RC1 -- cgit