summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/install-alpine-packages.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /packaging/makeself/install-alpine-packages.sh
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself/install-alpine-packages.sh')
-rwxr-xr-xpackaging/makeself/install-alpine-packages.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/packaging/makeself/install-alpine-packages.sh b/packaging/makeself/install-alpine-packages.sh
new file mode 100755
index 00000000..b4e516be
--- /dev/null
+++ b/packaging/makeself/install-alpine-packages.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env sh
+#
+# Installation script for the alpine host
+# to prepare the static binary
+#
+# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
+#
+# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
+
+# Add required APK packages
+apk add --no-cache -U \
+ bash \
+ wget \
+ curl \
+ ncurses \
+ git \
+ netcat-openbsd \
+ alpine-sdk \
+ autoconf \
+ automake \
+ gcc \
+ make \
+ cmake \
+ libtool \
+ pkgconfig \
+ util-linux-dev \
+ gnutls-dev \
+ zlib-dev \
+ zlib-static \
+ libmnl-dev \
+ libnetfilter_acct-dev \
+ libuv-dev \
+ libuv-static \
+ lz4-dev \
+ lz4-static \
+ snappy-dev \
+ protobuf-dev \
+ binutils \
+ gzip \
+ xz || exit 1
+
+# snappy doesnt have static version in alpine, let's compile it
+export SNAPPY_VER="1.1.7"
+wget -O /snappy.tar.gz https://github.com/google/snappy/archive/${SNAPPY_VER}.tar.gz
+tar -C / -xf /snappy.tar.gz
+rm /snappy.tar.gz
+cd /snappy-${SNAPPY_VER} || exit 1
+mkdir build
+cd build || exit 1
+cmake -DCMAKE_BUILD_SHARED_LIBS=true -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR=lib ../
+make && make install