mirror of
https://github.com/netdata/netdata.git
synced 2025-04-28 14:42:31 +00:00
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>
This commit is contained in:
parent
f473c176ec
commit
83a50413a5
9 changed files with 26 additions and 0 deletions
|
@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libsnappy-dev,
|
||||
libprotobuf-dev,
|
||||
libprotoc-dev,
|
||||
cmake,
|
||||
autogen,
|
||||
autoconf,
|
||||
automake,
|
||||
|
|
|
@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libsnappy-dev,
|
||||
libprotobuf-dev,
|
||||
libprotoc-dev,
|
||||
cmake,
|
||||
autogen,
|
||||
autoconf,
|
||||
automake,
|
||||
|
|
|
@ -16,6 +16,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libsnappy-dev,
|
||||
libprotobuf-dev,
|
||||
libprotoc-dev,
|
||||
cmake,
|
||||
autogen,
|
||||
autoconf,
|
||||
automake,
|
||||
|
|
|
@ -16,6 +16,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libsnappy-dev,
|
||||
libprotobuf-dev,
|
||||
libprotoc-dev,
|
||||
cmake,
|
||||
autogen,
|
||||
autoconf,
|
||||
automake,
|
||||
|
|
|
@ -3,6 +3,7 @@ Build-Depends: debhelper (>= 9),
|
|||
dh-autoreconf,
|
||||
pkg-config,
|
||||
dpkg-dev (>= 1.13.19),
|
||||
cmake,
|
||||
zlib1g-dev,
|
||||
uuid-dev
|
||||
Section: net
|
||||
|
|
|
@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libsnappy-dev,
|
||||
libprotobuf-dev,
|
||||
libprotoc-dev,
|
||||
cmake,
|
||||
autogen,
|
||||
autoconf,
|
||||
automake,
|
||||
|
|
|
@ -19,6 +19,7 @@ TEMPTOP = $(CURDIR)/debian/tmp
|
|||
|
||||
override_dh_auto_configure:
|
||||
packaging/bundle-mosquitto.sh .
|
||||
packaging/bundle-lws.sh .
|
||||
autoreconf -ivf
|
||||
dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib \
|
||||
--libexecdir=/usr/libexec --with-user=netdata --with-math --with-zlib --with-webdir=/var/lib/netdata/www
|
||||
|
|
|
@ -109,6 +109,7 @@ BuildRequires: autoconf-archive
|
|||
BuildRequires: autogen
|
||||
%endif
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: curl
|
||||
BuildRequires: findutils
|
||||
|
@ -233,6 +234,7 @@ happened, on your systems and applications.
|
|||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-mosquitto.sh ${RPM_BUILD_DIR}/%{name}-%{version}
|
||||
${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-lws.sh ${RPM_BUILD_DIR}/%{name}-%{version}
|
||||
|
||||
%build
|
||||
# Conf step
|
||||
|
|
17
packaging/bundle-lws.sh
Executable file
17
packaging/bundle-lws.sh
Executable file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue