Files
zulip/scripts/lib/build-pgroonga
Anders Kaseorg 60fe9d438f build-pgroonga: Use msgpack-c on Debian 13.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2025-08-13 14:11:05 -07:00

27 lines
653 B
Bash
Executable File

#!/usr/bin/env bash
set -euxo pipefail
version="4.0.1"
sha256=e2dfe40f3a0342e9ce4f1212043c46564fda3678e8cfda8587bbc37b103ebd17
tmpdir="$(mktemp -d)"
trap 'rm -r "$tmpdir"' EXIT
cd "$tmpdir"
tarball="pgroonga-$version.tar.gz"
curl -fLO --retry 3 "https://github.com/pgroonga/pgroonga/releases/download/$version/$tarball"
sha256sum -c <<<"$sha256 $tarball"
tar -xzf "$tarball"
cd "pgroonga-$version"
if pkg-config msgpack-c; then
msgpack='msgpack-c'
elif pkg-config msgpack; then
msgpack='msgpack'
else
echo 'build-pgroonga: Cannot find msgpack'
exit 1
fi
make -j "$(nproc)" HAVE_MSGPACK=1 MSGPACK_PACKAGE_NAME="$msgpack"
make install