diff --git a/contrib/debian/control b/contrib/debian/control index e6d6a958bd..f0c4bf303e 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9), libsnappy-dev, libprotobuf-dev, libprotoc-dev, + cmake, autogen, autoconf, automake, diff --git a/contrib/debian/control.buster b/contrib/debian/control.buster index 2ba868454e..b601ddb993 100644 --- a/contrib/debian/control.buster +++ b/contrib/debian/control.buster @@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9), libsnappy-dev, libprotobuf-dev, libprotoc-dev, + cmake, autogen, autoconf, automake, diff --git a/contrib/debian/control.jessie b/contrib/debian/control.jessie index 9ba76af26a..42247b345c 100644 --- a/contrib/debian/control.jessie +++ b/contrib/debian/control.jessie @@ -16,6 +16,7 @@ Build-Depends: debhelper (>= 9), libsnappy-dev, libprotobuf-dev, libprotoc-dev, + cmake, autogen, autoconf, automake, diff --git a/contrib/debian/control.trusty b/contrib/debian/control.trusty index 9aa3660f12..3b8873c02e 100644 --- a/contrib/debian/control.trusty +++ b/contrib/debian/control.trusty @@ -16,6 +16,7 @@ Build-Depends: debhelper (>= 9), libsnappy-dev, libprotobuf-dev, libprotoc-dev, + cmake, autogen, autoconf, automake, diff --git a/contrib/debian/control.wheezy b/contrib/debian/control.wheezy index b647a88f45..8441d9d666 100644 --- a/contrib/debian/control.wheezy +++ b/contrib/debian/control.wheezy @@ -3,6 +3,7 @@ Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, dpkg-dev (>= 1.13.19), + cmake, zlib1g-dev, uuid-dev Section: net diff --git a/contrib/debian/control.xenial b/contrib/debian/control.xenial index bd3e79ba33..43796567cd 100644 --- a/contrib/debian/control.xenial +++ b/contrib/debian/control.xenial @@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9), libsnappy-dev, libprotobuf-dev, libprotoc-dev, + cmake, autogen, autoconf, automake, diff --git a/contrib/debian/rules b/contrib/debian/rules index 5993712580..09883140d3 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -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 diff --git a/netdata.spec.in b/netdata.spec.in index b8161da980..1d6126d0af 100644 --- a/netdata.spec.in +++ b/netdata.spec.in @@ -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 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