From 11a969fea000d4210a6420307f790b34554267e8 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 21 Apr 2024 02:51:33 +0000 Subject: automatic import of swoole --- .gitignore | 1 + sources | 1 + swoole.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 sources create mode 100644 swoole.spec diff --git a/.gitignore b/.gitignore index e69de29..011f8ae 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/v5.1.2.tar.gz diff --git a/sources b/sources new file mode 100644 index 0000000..accfbf7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +863ca6c2a64b621d5b7852d747a111f3 v5.1.2.tar.gz diff --git a/swoole.spec b/swoole.spec new file mode 100644 index 0000000..9d11007 --- /dev/null +++ b/swoole.spec @@ -0,0 +1,87 @@ +%global ini_name 40-swoole.ini + +Name: swoole +Version: 5.1.2 +Release: 1 +Summary: Event-driven asynchronous and concurrent networking engine with high performance for PHP +License: Apache 2.0 +URL: https://www.swoole.com/ +Source0: https://github.com/swoole/swoole-src/archive/refs/tags/v%{version}.tar.gz +BuildRequires: php(language) >= 8.0 +BuildRequires: php-cli >= 8.0 +BuildRequires: php-devel +BuildRequires: openssl-devel >= 1.0.2 +BuildRequires: curl-devel +BuildRequires: c-ares-devel +BuildRequires: libnghttp2-devel +BuildRequires: brotli-devel +BuildRequires: libpq-devel +Requires: php(api) = %{php_core_api} +Requires: php-curl + +%description +Event-driven asynchronous and concurrent networking engine with high performance for PHP. + - event-driven + - coroutine + - asynchronous non-blocking + - multi-thread reactor + - multi-process worker + - multi-protocol + - millisecond timer + - built-in tcp/http/websocket/http2 server + - coroutine tcp/http/websocket client + - coroutine mysql client + - coroutine redis client + - coroutine read/write file system + - coroutine dns lookup + - support IPv4/IPv6/UnixSocket/TCP/UDP + - support SSL/TLS encrypted transmission + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: php-devel >= 8.0 + +%description devel +Development files for %{name}. + +%prep +%autosetup -p1 -n swoole-src-%{version} + +# Drop in the bit of configuration +cat << 'EOF' | tee %{ini_name} +; Enable swoole extension module +extension = swoole.so +EOF + +%build +%{_bindir}/phpize +%configure \ + --enable-openssl \ + --with-openssl-dir=%{_prefix} \ + --with-brotli-dir=%{_prefix} \ + --enable-cares \ + --enable-swoole-curl \ + --with-nghttp2-dir=%{_prefix} \ + --enable-swoole-pgsql +%make_build + +%install +%make_install INSTALL_ROOT=%{buildroot} + +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +%files +%license LICENSE +%{php_inidir}/%{ini_name} +%{_libdir}/php/modules/swoole.so + +%files devel +%{_includedir}/php/ext/swoole + +%changelog +* Sun Apr 21 2024 Funda Wang - 5.1.2-1 +- 5.1.2 + +* Mon Aug 21 2023 Funda Wang - 5.0.3-1 +- Import package -- cgit v1.2.3