summaryrefslogtreecommitdiffstats
path: root/packaging/bundle-lws.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /packaging/bundle-lws.sh
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xpackaging/bundle-lws.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/packaging/bundle-lws.sh b/packaging/bundle-lws.sh
new file mode 100755
index 000000000..4ecf0ca92
--- /dev/null
+++ b/packaging/bundle-lws.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+startdir="${PWD}"
+
+LWS_TARBALL="v$(cat "${1}/packaging/libwebsockets.version").tar.gz"
+LWS_BUILD_PATH="${1}/externaldeps/libwebsockets/libwebsockets-$(cat "${1}/packaging/libwebsockets.version")"
+
+mkdir -p "${1}/externaldeps/libwebsockets" || exit 1
+curl -sSL --connect-timeout 10 --retry 3 "https://github.com/warmcat/libwebsockets/archive/${LWS_TARBALL}" > "${LWS_TARBALL}" || exit 1
+sha256sum -c "${1}/packaging/libwebsockets.checksums" || exit 1
+tar -xzf "${LWS_TARBALL}" -C "${1}/externaldeps/libwebsockets" || exit 1
+cd "${LWS_BUILD_PATH}" || exit 1
+cmake -D LWS_WITH_SOCKS5:boolean=YES . || exit 1
+make || exit 1
+cd "${startdir}" || exit 1
+cp -a "${LWS_BUILD_PATH}/lib/libwebsockets.a" "${1}/externaldeps/libwebsockets" || exit 1
+cp -a "${LWS_BUILD_PATH}/include" "${1}/externaldeps/libwebsockets" || exit 1