diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-03-09 07:38:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 07:38:05 -0400 |
commit | 83a50413a54cf0d0ddb2d42fb445b5607958a0db (patch) | |
tree | 54637d874fb15978a1552a93735bcb9a9f8eca00 /packaging | |
parent | f473c176ec1c47ec724069e3071d23520b1d98cb (diff) |
Added code to bundle LWS in binary packages. (#8255)
* Added code to bundle LWS in binary packages.
This adds the required tode to bundle a custom build of libwebsockets as
required by Netdata Cloud functionality into the binary packages.
* Update packaging/bundle-lws.sh
Co-Authored-By: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/bundle-lws.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packaging/bundle-lws.sh b/packaging/bundle-lws.sh new file mode 100755 index 0000000000..4ecf0ca925 --- /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 |