Install the alpha version of zookeeper

pull/363/head
Michele Locati 2021-06-30 11:31:45 +02:00
parent 5bae34bca3
commit 5ec117a62b
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
2 changed files with 25 additions and 13 deletions

View File

@ -103,5 +103,5 @@ We should switch to the stable release once it will be available.
### zookeeper
The latest stable release of the `zookeeper` PHP extension doesn't support PHP 7.3+, so we install the beta version.
The latest stable release of the `zookeeper` PHP extension doesn't support PHP 7.3+, so we install the alpha version.
We should switch to the stable release once it will be available.

View File

@ -2199,16 +2199,32 @@ installRemoteModule() {
fi
;;
zookeeper)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.5.0
else
installRemoteModule_version=1.0.0
fi
fi
case "$DISTRO" in
alpine)
if ! test -f /usr/local/include/zookeeper/zookeeper.h; then
installRemoteModule_tmp="$(curl -sSLf https://downloads.apache.org/zookeeper/stable | sed -E 's/["<>]/\n/g' | grep -E '^(apache-)?zookeeper-[0-9]+\.[0-9]+\.[0-9]+\.(tar\.gz|tgz)$' | head -n1)"
if test -z "$installRemoteModule_tmp"; then
echo 'Failed to detect the zookeeper library URL' >&2
exit 1
if test $(compareVersions "$installRemoteModule_version" 1.0.0) -lt 0; then
installRemoteModule_src="$(getPackageSource http://archive.apache.org/dist/zookeeper/zookeeper-3.5.9/apache-zookeeper-3.5.9.tar.gz)"
else
installRemoteModule_tmp="$(curl -sSLf https://downloads.apache.org/zookeeper/stable | sed -E 's/["<>]/\n/g' | grep -E '^(apache-)?zookeeper-[0-9]+\.[0-9]+\.[0-9]+\.(tar\.gz|tgz)$' | head -n1)"
if test -z "$installRemoteModule_tmp"; then
echo 'Failed to detect the zookeeper library URL' >&2
exit 1
fi
installRemoteModule_src="$(getPackageSource https://downloads.apache.org/zookeeper/stable/$installRemoteModule_tmp)"
fi
installRemoteModule_src="$(getPackageSource https://downloads.apache.org/zookeeper/stable/$installRemoteModule_tmp)"
cd -- "$installRemoteModule_src"
if test -d ~/.m2; then
installRemoteModule_delm2=n
else
installRemoteModule_delm2=y
fi
mvn -pl zookeeper-jute compile
cd - >/dev/null
cd -- "$installRemoteModule_src/zookeeper-client/zookeeper-client-c"
@ -2217,16 +2233,12 @@ installRemoteModule() {
make -j$(getProcessorCount) CFLAGS='-Wno-stringop-truncation -Wno-format-overflow'
make install
cd - >/dev/null
if test $installRemoteModule_delm2 = y; then
rm -rf ~/.m2
fi
fi
;;
esac
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.5.0
elif test $PHP_MAJMIN_VERSION -ge 703; then
installRemoteModule_version=beta
fi
fi
;;
esac
if test $installRemoteModule_manuallyInstalled -eq 0; then