@cryptotaxi247 / netdata-1 / commits / f457afa30

netdata/packaging: Bring on board two scripts that build libuv and judy from source (#6850)

* netdata/packaging: Script to build judy from source * netdata/packaging: Add script to build libuv from source

Paul Emm. Katsoulakis committed Sep 15, 2019 at 13:41 UTC f457afa30d82bc2e125d9e6e12e72668b884f01e
2 files changed +72
.travis/package_management/build_judy.sh new
+36
@@ -0,0 +1,36 @@
1 +#!/usr/bin/env bash
2 +#
3 +# Build Judy from source, you need to run this script as root.
4 +#
5 +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 +#
7 +# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
8 +set -e
9 +JUDY_VER="1.0.5"
10 +JUDY_DIR="/opt/judy-${JUDY_VER}"
11 +
12 +# If we are not in netdata git repo, at the top level directory, fail
13 +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
14 +CWD=$(git rev-parse --show-cdup)
15 +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
16 + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository"
17 + echo "Build Judy package from source code failed"
18 + exit 1
19 +fi
20 +
21 +echo "Fetching judy source tarball"
22 +wget -O /opt/judy.tar.gz http://downloads.sourceforge.net/project/judy/judy/Judy-${JUDY_VER}/Judy-${JUDY_VER}.tar.gz
23 +
24 +echo "Entering /opt directory and extracting tarball"
25 +cd /opt && tar -xf judy.tar.gz && rm judy.tar.gz
26 +
27 +echo "Entering ${JUDY_DIR}"
28 +cd "${JUDY_DIR}"
29 +
30 +echo "Running configure"
31 +CFLAGS="-O2 -s" CXXFLAGS="-O2 -s" ./configure
32 +
33 +echo "Compiling and installing"
34 +make && make install
35 +
36 +echo "Done, enjoy Judy!"
.travis/package_management/build_libuv.sh new
+36
@@ -0,0 +1,36 @@
1 +#!/usr/bin/env bash
2 +#
3 +# Build libuv from source, you need to run this script as root.
4 +#
5 +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 +#
7 +# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud>
8 +set -e
9 +LIBUV_VERSION="v1.32.0"
10 +# Their folder is libuv-1.32.0 while the tarball version is v1.32.0, so fix that until they fix it...
11 +LIBUV_DIR="/opt/libuv-${LIBUV_VERSION/v/}"
12 +
13 +# If we are not in netdata git repo, at the top level directory, fail
14 +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
15 +CWD=$(git rev-parse --show-cdup)
16 +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
17 + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository"
18 + echo "Build libuv package from source code failed"
19 + exit 1
20 +fi
21 +
22 +echo "Fetching libuv from github"
23 +wget -O /opt/libuv.tar.gz "https://github.com/libuv/libuv/archive/${LIBUV_VERSION}.tar.gz"
24 +
25 +echo "Entering /opt and extracting source"
26 +cd /opt && tar -xf libuv.tar.gz && rm libuv.tar.gz
27 +
28 +echo "Entering ${LIBUV_DIR}"
29 +cd "${LIBUV_DIR}"
30 +
31 +echo "Compiling and installing"
32 +sh autogen.sh
33 +./configure
34 +make && make check && make install
35 +
36 +echo "Done, enjoy libuv!"