50-curl-7.82.0.install.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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="7.82.0"
  6. # shellcheck disable=SC2015
  7. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true
  8. fetch "curl-${version}" "https://curl.haxx.se/download/curl-${version}.tar.gz" \
  9. 910cc5fe279dc36e2cca534172c94364cf3fcf7d6494ba56e6c61a390881ddce curl
  10. export CFLAGS="-I/openssl-static/include -pipe"
  11. export LDFLAGS="-static -L/openssl-static/lib"
  12. export PKG_CONFIG="pkg-config --static"
  13. export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig"
  14. if [ "${CACHE_HIT:-0}" -eq 0 ]; then
  15. run autoreconf -fi
  16. run ./configure \
  17. --prefix="${NETDATA_INSTALL_PATH}" \
  18. --enable-optimize \
  19. --disable-shared \
  20. --enable-static \
  21. --enable-http \
  22. --disable-ldap \
  23. --disable-ldaps \
  24. --enable-proxy \
  25. --disable-dict \
  26. --disable-telnet \
  27. --disable-tftp \
  28. --disable-pop3 \
  29. --disable-imap \
  30. --disable-smb \
  31. --disable-smtp \
  32. --disable-gopher \
  33. --enable-ipv6 \
  34. --enable-cookies \
  35. --with-ca-fallback \
  36. --with-openssl \
  37. --disable-dependency-tracking
  38. # Curl autoconf does not honour the curl_LDFLAGS environment variable
  39. run sed -i -e "s/LDFLAGS =/LDFLAGS = -all-static/" src/Makefile
  40. run make clean
  41. run make -j "$(nproc)"
  42. fi
  43. run make install
  44. store_cache curl "${NETDATA_MAKESELF_PATH}/tmp/curl-${version}"
  45. if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
  46. run strip "${NETDATA_INSTALL_PATH}"/bin/curl
  47. fi
  48. # shellcheck disable=SC2015
  49. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true