summaryrefslogtreecommitdiffstats
path: root/php-pecl-openswoole22.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-12-22 16:15:20 +0100
committerRemi Collet <remi@php.net>2022-12-22 16:15:20 +0100
commit404f69deb283e127465e108141cd1814aee7ae04 (patch)
tree787469caf255c23a2489d06a8535cfe694619a8c /php-pecl-openswoole22.spec
parent3cb305dc7dd1f344de907d6dcc639ae84956c139 (diff)
update to 22.0.0
rename to php-pecl-openswoole22 for new API drop dependency on json extension
Diffstat (limited to 'php-pecl-openswoole22.spec')
-rw-r--r--php-pecl-openswoole22.spec78
1 files changed, 35 insertions, 43 deletions
diff --git a/php-pecl-openswoole22.spec b/php-pecl-openswoole22.spec
index 03ea17a..d4db1bb 100644
--- a/php-pecl-openswoole22.spec
+++ b/php-pecl-openswoole22.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php-pecl-openswoole
+# remirepo spec file for php-pecl-openswoole22
#
# Copyright (c) 2013-2022 Remi Collet
# License: CC-BY-SA
@@ -11,12 +11,13 @@
%undefine _strict_symbol_defs_build
%if 0%{?scl:1}
-%scl_package php-pecl-swoole4
+%scl_package php-pecl-openswoole22
%endif
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+# See https://github.com/openswoole/swoole-src/issues/287
+%global with_zts 0
%global pecl_name openswoole
-# After 20-sockets, 20-json and 20-mysqlnd
+# After 20-sockets, 20-mysqlnd
%global ini_name 40-%{pecl_name}.ini
%bcond_without cares
@@ -28,12 +29,12 @@
%endif
%bcond_without pgsql
-%global upstream_version 4.12.1
+%global upstream_version 22.0.0
#global upstream_prever RC2
-Summary: PHP's asynchronous concurrent distributed networking framework
-Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Summary: High Performance Programmatic Server for PHP with Async IO, Coroutines and Fibers
+Name: %{?scl_prefix}php-pecl-%{pecl_name}22
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
# SPDX: extension is Apache-2.0
@@ -48,7 +49,6 @@ BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel >= 7.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-curl
-BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-sockets
BuildRequires: %{?scl_prefix}php-mysqlnd
BuildRequires: pcre-devel
@@ -72,7 +72,6 @@ BuildRequires: postgresql-devel > 9
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-curl%{?_isa}
-Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-sockets%{?_isa}
Requires: %{?scl_prefix}php-mysqlnd%{?_isa}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
@@ -82,33 +81,27 @@ 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 0%{?fedora} >= 38 || 0%{?rhel} >= 10 || "%{php_version}" > "8.3"
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 22
+Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%else
+# A single version can be installed
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 22
+%endif
# Only one extension can be installed (same symbols)
-Conflicts: %{?scl_prefix}php-pecl-swoole
-Conflicts: %{?scl_prefix}php-pecl-swoole2
-Conflicts: %{?scl_prefix}php-pecl-swoole4
-Conflicts: %{?scl_prefix}php-pecl-swoole5
+Conflicts: %{?scl_prefix}php-pecl-swoole
+Conflicts: %{?scl_prefix}php-pecl-swoole2
+Conflicts: %{?scl_prefix}php-pecl-swoole4
+Conflicts: %{?scl_prefix}php-pecl-swoole5
%description
-Event-driven asynchronous and concurrent networking engine with
-high performance for PHP.
-- event-driven
-- asynchronous non-blocking
-- multi-thread reactor
-- multi-process worker
-- multi-protocol
-- millisecond timer
-- async mysql client
-- built-in http/websocket/http2 server
-- async http/websocket client
-- async redis client
-- async task
-- async read/write file system
-- async dns lookup
-- support IPv4/IPv6/UnixSocket/TCP/UDP
-- support SSL/TLS encrypted transmission
-
-Documentation: https://rawgit.com/tchiotludo/swoole-ide-helper/english/docs/
+Build high-performance, scalable, concurrent TCP, UDP, Unix Socket, HTTP,
+WebSocket services with PHP and easy to use coroutine, fibers API.
+
+Documentation for Open Swoole can be found on https://openswoole.com/docs
+
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -161,12 +154,10 @@ cat << 'EOF' | tee %{ini_name}
extension=%{pecl_name}.so
; Configuration
-;swoole.enable_coroutine = On
-;swoole.enable_library = On
-;swoole.enable_preemptive_scheduler = Off
-;swoole.display_errors = On
-:swoole.use_shortname = On
-;swoole.unixsock_buffer_size = 8388608
+;openswoole.enable_coroutine = On
+;openswoole.enable_preemptive_scheduler = Off
+;openswoole.display_errors = On
+;openswoole.unixsock_buffer_size = 8388608
EOF
@@ -184,11 +175,10 @@ peclbuild() {
%if %{with pgsql}
--with-postgres \
%endif
- --enable-swoole-json \
- --enable-swoole-curl \
%if %{with cares}
--enable-cares \
%endif
+ --enable-hook-curl \
--with-libdir=%{_lib} \
--with-php-config=$1
@@ -235,7 +225,6 @@ 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
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
@@ -261,7 +250,6 @@ fi
%check
OPT="--no-php-ini"
[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl.so"
-[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
[ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets.so"
[ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd.so"
@@ -299,7 +287,6 @@ cd ../ZTS
%files devel
%doc %{pecl_testdir}/%{pecl_name}
%doc %{pecl_docdir}/%{pecl_name}/*md
-%doc %{pecl_docdir}/%{pecl_name}/examples
%doc %{pecl_docdir}/%{pecl_name}/gdbinit
%doc %{pecl_docdir}/%{pecl_name}/thirdparty
%doc %{pecl_docdir}/%{pecl_name}/tools
@@ -313,6 +300,11 @@ cd ../ZTS
%changelog
+* Thu Dec 22 2022 Remi Collet <remi@remirepo.net> - 22.0.0-1
+- update to 22.0.0
+- rename to php-pecl-openswoole22 for new API
+- drop dependency on json extension
+
* Wed Dec 21 2022 Remi Collet <remi@remirepo.net> - 4.12.1-1
- update to 4.12.1