diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /packaging/bundle-protobuf.sh | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | packaging/bundle-protobuf.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packaging/bundle-protobuf.sh b/packaging/bundle-protobuf.sh new file mode 100755 index 00000000..d715dfe3 --- /dev/null +++ b/packaging/bundle-protobuf.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +PROTOBUF_TARBALL="protobuf-cpp-$(cat "${1}/packaging/protobuf.version").tar.gz" +PROTOBUF_BUILD_PATH="${1}/externaldeps/protobuf/protobuf-$(cat "${1}/packaging/protobuf.version")" + +mkdir -p "${1}/externaldeps/protobuf" || exit 1 +curl -sSL --connect-timeout 10 --retry 3 "https://github.com/protocolbuffers/protobuf/releases/download/v$(cat "${1}/packaging/protobuf.version")/${PROTOBUF_TARBALL}" > "${PROTOBUF_TARBALL}" || exit 1 +sha256sum -c "${1}/packaging/protobuf.checksums" || exit 1 +tar -xz --no-same-owner -f "${PROTOBUF_TARBALL}" -C "${1}/externaldeps/protobuf" || exit 1 +OLDPWD="${PWD}" +cd "${PROTOBUF_BUILD_PATH}" || exit 1 +./configure --disable-shared --without-zlib --disable-dependency-tracking --with-pic || exit 1 +make -j "$(nproc)" || exit 1 +cd "${OLDPWD}" || exit 1 + +cp -a "${PROTOBUF_BUILD_PATH}/src" "${1}/externaldeps/protobuf" || exit 1 |