install-dependencies 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh -ex
  2. COMMON="meson curl git file bzip2 asciidoc jq ${CC}"
  3. case "${DISTRO}" in
  4. osx:*)
  5. brew update
  6. for pkg in pkg-config jansson openssl zlib meson; do
  7. brew ls --versions "${pkg}" || brew install "${pkg}"
  8. brew outdated "${pkg}" || brew upgrade "${pkg}" || true
  9. done
  10. ;;
  11. debian:*|ubuntu:*)
  12. export DEBIAN_FRONTEND=noninteractive
  13. apt clean
  14. apt update
  15. # We get some errors once in a while, so let's try a few times.
  16. for i in 1 2 3; do
  17. apt -y install build-essential pkg-config libssl-dev zlib1g-dev \
  18. libjansson-dev ${COMMON} && break
  19. sleep 5
  20. done
  21. ;;
  22. *fedora:*)
  23. echo 'max_parallel_downloads=10' >> /etc/dnf/dnf.conf
  24. dnf -y clean all
  25. dnf -y --setopt=deltarpm=0 update
  26. dnf -y install ${COMMON} pkgconfig openssl-devel zlib-devel jansson-devel
  27. ;;
  28. centos:7)
  29. yum -y clean all
  30. yum -y --setopt=deltarpm=0 update
  31. yum install -y yum-utils epel-release centos-release-scl llvm-toolset-7
  32. yum -y install ${COMMON}
  33. yum-builddep -y jose
  34. ;;
  35. *centos:stream*)
  36. dnf -y clean all
  37. dnf -y --allowerasing --setopt=deltarpm=0 update
  38. dnf install -y yum-utils epel-release
  39. dnf config-manager -y --set-enabled crb \
  40. || dnf config-manager -y --set-enabled powertools || :
  41. dnf -y --allowerasing install ${COMMON}
  42. dnf builddep -y jose
  43. ;;
  44. esac
  45. # vim: set ts=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: