2022-04-23 13:22:53 +03:00
|
|
|
#!/bin/bash -x
|
|
|
|
set -e
|
|
|
|
source /etc/os-release
|
|
|
|
|
2022-05-14 09:02:11 +03:00
|
|
|
# The first line for each distro installs a build dependency.
|
|
|
|
# The second line installs extra packages for `make test`.
|
|
|
|
|
2022-08-05 09:40:06 +03:00
|
|
|
case "$ID-$VERSION_ID" in
|
|
|
|
ubuntu-20.*)
|
2022-08-05 09:40:41 +03:00
|
|
|
apt-get install -y cmake libssl-dev zlib1g-dev gcc g++ g++-10
|
2022-05-14 09:02:11 +03:00
|
|
|
apt-get install -y file bsdmainutils
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
ubuntu-22.* | debian-11)
|
2022-08-05 09:40:41 +03:00
|
|
|
apt-get install -y cmake libssl-dev zlib1g-dev gcc g++
|
2022-05-14 09:02:11 +03:00
|
|
|
apt-get install -y file bsdmainutils
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
fedora-*)
|
2022-08-05 09:40:41 +03:00
|
|
|
dnf install -y gcc-g++ cmake openssl-devel zlib-devel
|
2022-05-14 09:02:11 +03:00
|
|
|
dnf install -y glibc-static file libstdc++-static diffutils
|
2022-04-23 13:22:53 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
opensuse-leap-*)
|
2022-08-05 09:40:41 +03:00
|
|
|
zypper install -y make cmake zlib-devel libopenssl-devel gcc-c++ gcc11-c++
|
2022-05-14 09:02:11 +03:00
|
|
|
zypper install -y glibc-devel-static tar diffutils util-linux
|
2022-05-14 08:47:10 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
opensuse-tumbleweed-*)
|
2022-08-05 09:40:41 +03:00
|
|
|
zypper install -y make cmake zlib-devel libopenssl-devel gcc-c++
|
2022-05-14 09:02:11 +03:00
|
|
|
zypper install -y glibc-devel-static tar diffutils util-linux
|
2022-05-14 08:47:10 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
gentoo-*)
|
2022-08-05 09:40:41 +03:00
|
|
|
emerge dev-util/cmake sys-libs/zlib
|
2022-05-13 05:45:08 +03:00
|
|
|
;;
|
2022-08-05 09:40:06 +03:00
|
|
|
arch-*)
|
2022-07-14 08:44:40 +03:00
|
|
|
pacman -S --needed --noconfirm base-devel zlib openssl cmake util-linux git
|
2022-07-14 08:02:11 +03:00
|
|
|
;;
|
2022-04-23 13:22:53 +03:00
|
|
|
*)
|
|
|
|
echo "Error: don't know anything about build dependencies on $ID $VERSION_ID"
|
|
|
|
exit 1
|
|
|
|
esac
|