diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-13 08:37:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-13 08:38:18 +0000 |
commit | ca540a730c0b880922e86074f994a95b8d413bea (patch) | |
tree | 1364a1b82cfcc68f51aabf9b2545e6a06059d6bb /.travis/package_management/build_libuv.sh | |
parent | Releasing debian version 1.17.1-1. (diff) | |
download | netdata-ca540a730c0b880922e86074f994a95b8d413bea.tar.xz netdata-ca540a730c0b880922e86074f994a95b8d413bea.zip |
Merging upstream version 1.18.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis/package_management/build_libuv.sh')
-rwxr-xr-x | .travis/package_management/build_libuv.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.travis/package_management/build_libuv.sh b/.travis/package_management/build_libuv.sh new file mode 100755 index 000000000..c30eede64 --- /dev/null +++ b/.travis/package_management/build_libuv.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Build libuv from source, you need to run this script as root. +# +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later +# +# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud> +set -e +LIBUV_VERSION="v1.32.0" +# Their folder is libuv-1.32.0 while the tarball version is v1.32.0, so fix that until they fix it... +LIBUV_DIR="/opt/libuv-${LIBUV_VERSION/v/}" + +# If we are not in netdata git repo, at the top level directory, fail +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") +CWD=$(git rev-parse --show-cdup) +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository" + echo "Build libuv package from source code failed" + exit 1 +fi + +echo "Fetching libuv from github" +wget -O /opt/libuv.tar.gz "https://github.com/libuv/libuv/archive/${LIBUV_VERSION}.tar.gz" + +echo "Entering /opt and extracting source" +cd /opt && tar -xf libuv.tar.gz && rm libuv.tar.gz + +echo "Entering ${LIBUV_DIR}" +cd "${LIBUV_DIR}" + +echo "Compiling and installing" +sh autogen.sh +./configure +make && make check && make install + +echo "Done, enjoy libuv!" |