master
sh 36 lines 1.16 KB
Raw
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: GPL-3.0-or-later
3
4 # shellcheck source=packaging/makeself/functions.sh
5 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
6 # Source of truth for all the packages we bundle in static builds
7 . "$(dirname "${0}")/../bundled-packages.version" || exit 1
8
9 # shellcheck disable=SC2015
10 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true
11
12 cache_key="ioping"
13 build_dir="ioping-${IOPING_VERSION}"
14
15 fetch "${build_dir}" "${IOPING_SOURCE}/archive/refs/tags/v${IOPING_VERSION}.tar.gz" \
16 "${IOPING_ARTIFACT_SHA256}" "${cache_key}"
17
18 export CFLAGS="${TUNING_FLAGS} -static -pipe"
19 export CXXFLAGS="${CFLAGS}"
20
21 if [ "${CACHE_HIT:-0}" -eq 0 ]; then
22 run make clean
23 run make -j "$(nproc)"
24 fi
25
26 run mkdir -p "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/
27 run install -o root -g root -m 4750 ioping "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/
28
29 store_cache "${cache_key}" "${build_dir}"
30
31 if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
32 run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping
33 fi
34
35 # shellcheck disable=SC2015
36 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true