.travis.install 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash -ex
  2. COMMON="meson curl git make file bzip2 $CC"
  3. case "$DISTRO" in
  4. osx:*)
  5. brew update
  6. for pkg in 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. # This solves an intermittant error when fetching packages on debian
  13. sed -i 's|httpredir.debian.org|ftp.us.debian.org|g' /etc/apt/sources.list
  14. apt-get clean
  15. while ! apt-get update; do
  16. sleep 5
  17. done
  18. while ! apt-get -y \
  19. -o Dpkg::Options::="--force-confdef" \
  20. -o Dpkg::Options::="--force-confnew" \
  21. dist-upgrade; do
  22. sleep 5
  23. done
  24. while ! apt-get -y install $COMMON \
  25. build-essential pkg-config libssl-dev zlib1g-dev libjansson-dev; do
  26. sleep 5
  27. done
  28. ;;
  29. fedora:*)
  30. dnf -y clean all
  31. dnf -y --setopt=deltarpm=0 update
  32. dnf -y install $COMMON pkgconfig openssl-devel zlib-devel jansson-devel findutils
  33. ;;
  34. centos:*)
  35. yum -y clean all
  36. yum -y --setopt=deltarpm=0 update
  37. yum install -y yum-utils
  38. yum config-manager -y --set-enabled PowerTools
  39. yum -y install epel-release
  40. yum -y install $COMMON pkgconfig openssl-devel zlib-devel jansson-devel findutils gcc
  41. sed -i 's|>=1\.0\.2|>=1\.0\.1|' meson.build
  42. ;;
  43. esac