50-bash-5.1.16.install.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/usr/bin/env bash
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. # shellcheck source=packaging/makeself/functions.sh
  4. . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
  5. # Source of truth for all the packages we bundle in static builds
  6. . "$(dirname "${0}")/../bundled-packages.version"
  7. # shellcheck disable=SC2015
  8. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
  9. fetch "bash-${BASH_VERSION}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
  10. "${BASH_ARTIFACT_SHA256}" bash
  11. export CFLAGS="${TUNING_FLAGS} -pipe"
  12. export CXXFLAGS="${CFLAGS}"
  13. export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
  14. if [ "${CACHE_HIT:-0}" -eq 0 ]; then
  15. run ./configure \
  16. --prefix="${NETDATA_INSTALL_PATH}" \
  17. --without-bash-malloc \
  18. --enable-static-link \
  19. --enable-net-redirections \
  20. --enable-array-variables \
  21. --disable-progcomp \
  22. --disable-profiling \
  23. --disable-nls \
  24. --disable-dependency-tracking
  25. run make clean
  26. run make -j "$(nproc)"
  27. cat > examples/loadables/Makefile <<-EOF
  28. all:
  29. clean:
  30. install:
  31. EOF
  32. fi
  33. run make install
  34. store_cache bash "${NETDATA_MAKESELF_PATH}/tmp/bash-${BASH_VERSION}"
  35. if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
  36. run strip "${NETDATA_INSTALL_PATH}"/bin/bash
  37. fi
  38. # shellcheck disable=SC2015
  39. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true