master
sh 53 lines 1.39 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"
8
9 # shellcheck disable=SC2015
10 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building bash" || true
11
12 cache_key="bash"
13 build_dir="bash-${BASH_VERSION}"
14
15 fetch "${build_dir}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
16 "${BASH_ARTIFACT_SHA256}" "${cache_key}"
17
18 export CFLAGS="${TUNING_FLAGS} -pipe"
19 export CXXFLAGS="${CFLAGS}"
20 export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
21
22 if [ "${CACHE_HIT:-0}" -eq 0 ]; then
23 run ./configure \
24 --prefix="${NETDATA_INSTALL_PATH}" \
25 --without-bash-malloc \
26 --enable-static-link \
27 --enable-net-redirections \
28 --enable-array-variables \
29 --disable-progcomp \
30 --disable-profiling \
31 --disable-nls \
32 --disable-dependency-tracking
33
34 run make clean
35 run make -j "$(nproc)"
36
37 cat > examples/loadables/Makefile <<-EOF
38 all:
39 clean:
40 install:
41 EOF
42 fi
43
44 run make install
45
46 store_cache "${cache_key}" "${build_dir}"
47
48 if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
49 run strip "${NETDATA_INSTALL_PATH}"/bin/bash
50 fi
51
52 # shellcheck disable=SC2015
53 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true