diff options
author | CoprDistGit <infra@openeuler.org> | 2023-08-21 04:19:55 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-08-21 04:19:55 +0000 |
commit | a9a985de5ec41bfc45b2d1db6004aa9beeade55e (patch) | |
tree | 016ded29b491b621c917a8463a42552f67731b02 | |
parent | 7baba3d4a0c8cd61181ac0e7f7d5b23032417495 (diff) |
automatic import of swoole
-rw-r--r-- | swoole.spec | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/swoole.spec b/swoole.spec index 4b16ee8..297a6ea 100644 --- a/swoole.spec +++ b/swoole.spec @@ -1,3 +1,5 @@ +%global ini_name 40-swoole.ini + Name: swoole Version: 5.0.3 Release: 1 @@ -5,13 +7,17 @@ Summary: Event-driven asynchronous and concurrent networking engine with 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) +BuildRequires: php(language) >= 8.0 +BuildRequires: php-cli >= 8.0 BuildRequires: php-devel BuildRequires: openssl-devel >= 1.0.2 +BuildRequires: c-ares-devel +BuildRequires: curl-devel BuildRequires: libnghttp2-devel BuildRequires: jemalloc-devel BuildRequires: brotli-devel BuildRequires: libpq-devel +Requires: php(language) >= 8.0 %description Event-driven asynchronous and concurrent networking engine with high performance for PHP. @@ -34,7 +40,7 @@ Event-driven asynchronous and concurrent networking engine with high performance %package devel Summary: Development files for %{name} Requires: %{name} = %{version} -Requires: php-devel +Requires: php-devel >= 8.0 %description devel Development files for %{name}. @@ -42,13 +48,20 @@ 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-sockets \ + --enable-cares \ + --enable-swoole-curl \ --with-nghttp2-dir=%{_prefix} \ --with-jemalloc-dir=%{_prefix} \ --enable-swoole-pgsql @@ -57,8 +70,16 @@ Development files for %{name}. %install %make_install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +%check +%{__php} --no-php-ini \ + --define extension=%{buildroot}%{php_extdir}/%{name}.so \ + --modules | grep '^%{name}$' + %files %license LICENSE +%{php_inidir}/%{ini_name} %{_libdir}/php/modules/swoole.so %files devel |