diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-02-14 07:45:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 07:45:52 -0500 |
commit | a1b1ee2f2cd68b168825bb54ec0b8654af703054 (patch) | |
tree | fc39bf6e45d48066cbfd3ab5ccb2087d6d04f6cb /packaging | |
parent | f4e1012f5ffe1231c25e22f7350d2928b443c69f (diff) |
Add handling of libmosquitto to binary packages. (#8085)
This adds code to handle bundling our custom fork of libmosquitto into
our binary packages. It pulls down the required sources, builds them,
and copies the build artifacts into the right place so that the build of
Netdata actually uses them.
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/bundle-mosquitto.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packaging/bundle-mosquitto.sh b/packaging/bundle-mosquitto.sh new file mode 100755 index 0000000000..c5a8dc85f3 --- /dev/null +++ b/packaging/bundle-mosquitto.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +MOSQUITTO_TARBALL="$(cat "${1}/packaging/mosquitto.version").tar.gz" +MOSQUITTO_BUILD_PATH="${1}/externaldeps/mosquitto/mosquitto-$(cat "${1}/packaging/mosquitto.version")/lib" + +mkdir -p "${1}/externaldeps/mosquitto" || exit 1 +curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/mosquitto/archive/${MOSQUITTO_TARBALL}" > "${MOSQUITTO_TARBALL}" || exit 1 +sha256sum -c "${1}/packaging/mosquitto.checksums" || exit 1 +tar -xzf "${MOSQUITTO_TARBALL}" -C "${1}/externaldeps/mosquitto" || exit 1 +make -C "${MOSQUITTO_BUILD_PATH}" || exit 1 +cp -a "${MOSQUITTO_BUILD_PATH}/libmosquitto.a" "${1}/externaldeps/mosquitto" || exit 1 +cp -a "${MOSQUITTO_BUILD_PATH}/mosquitto.h" "${1}/externaldeps/mosquitto" || exit 1 |