Skip to content

Commit 645680c

Browse files
Merge pull request #62 from weierophinney/feature/prebuilt-swoole
Use pre-build Swoole/OpenSwoole extensions
2 parents 77968da + 8f95621 commit 645680c

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

mods-available/swoole.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

mods-install/install_swoole.sh

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,14 @@
22

33
set -e
44

5-
SWOOLE_VERSION=4.7.0
5+
SWOOLE_PACKAGE_URL=https://uploads.mwop.net/laminas-ci/swoole-4.8.2-openswoole-4.8.0.tgz
6+
SWOOLE_PACKAGE=$(basename "${SWOOLE_PACKAGE_URL}")
67

7-
# Get swoole package ONCE
8+
# Download the pre-built extensions
89
cd /tmp
9-
wget https://pecl.php.net/get/swoole-${SWOOLE_VERSION}.tgz
10-
tar xzf swoole-${SWOOLE_VERSION}.tgz
11-
12-
# We only need to support currently supported PHP versions
13-
for PHP_VERSION in 7.3 7.4 8.0;do
14-
cd /tmp/swoole-${SWOOLE_VERSION}
15-
if [ -f Makefile ];then
16-
make clean
17-
fi
18-
phpize${PHP_VERSION}
19-
./configure --enable-swoole --enable-sockets --with-php-config=php-config${PHP_VERSION}
20-
make
21-
make install
22-
23-
cp /mods-available/swoole.ini /etc/php/${PHP_VERSION}/mods-available/swoole.ini
24-
done
10+
wget "${SWOOLE_PACKAGE_URL}"
11+
cd /
12+
tar xzf "/tmp/${SWOOLE_PACKAGE}"
2513

2614
# Cleanup
27-
rm -rf /tmp/swoole-${SWOOLE_VERSION}
28-
rm /tmp/swoole-${SWOOLE_VERSION}.tgz
15+
rm -rf "/tmp/${SWOOLE_PACKAGE}"

0 commit comments

Comments
 (0)