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