summaryrefslogtreecommitdiffstats
path: root/packaging/bundle-protobuf.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:14 +0000
commitbb50acdcb8073654ea667b8c0272e335bd43f844 (patch)
tree1e00c8a29871426f8182658928dcb62e42d57ce8 /packaging/bundle-protobuf.sh
parentReleasing debian version 1.33.1-1. (diff)
downloadnetdata-bb50acdcb8073654ea667b8c0272e335bd43f844.tar.xz
netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.zip
Merging upstream version 1.34.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/bundle-protobuf.sh')
-rwxr-xr-xpackaging/bundle-protobuf.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/packaging/bundle-protobuf.sh b/packaging/bundle-protobuf.sh
new file mode 100755
index 000000000..98ab1ed17
--- /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 -xzf "${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