50-ioping-1.3.install.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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" || exit 1
  7. # shellcheck disable=SC2015
  8. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true
  9. fetch "ioping-${IOPING_VERSION}" "${IOPING_SOURCE}/archive/refs/tags/v${IOPING_VERSION}.tar.gz" \
  10. "${IOPING_ARTIFACT_SHA256}" ioping
  11. export CFLAGS="-static -pipe"
  12. if [ "${CACHE_HIT:-0}" -eq 0 ]; then
  13. run make clean
  14. run make -j "$(nproc)"
  15. fi
  16. run mkdir -p "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/
  17. run install -o root -g root -m 4750 ioping "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/
  18. store_cache ioping "${NETDATA_MAKESELF_PATH}/tmp/ioping-${IOPING_VERSION}"
  19. if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
  20. run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping
  21. fi
  22. # shellcheck disable=SC2015
  23. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true