2017-02-16 18:18:17 +08:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
set -e -x
|
|
|
|
|
|
|
|
#=== Install Packages ===
|
|
|
|
|
|
|
|
apt-get update
|
|
|
|
|
|
|
|
# Arch-independent packages required for building toxcore's dependencies and toxcore itself
|
|
|
|
apt-get install -y \
|
2021-02-22 10:15:13 +08:00
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
ca-certificates \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
libtool \
|
|
|
|
libc-dev \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
tree \
|
|
|
|
yasm
|
2017-02-16 18:18:17 +08:00
|
|
|
|
|
|
|
# Arch-dependent packages required for building toxcore's dependencies and toxcore itself
|
2020-05-10 00:50:48 +08:00
|
|
|
if [ "$SUPPORT_ARCH_i686" = "true" ]; then
|
2021-02-22 10:15:13 +08:00
|
|
|
apt-get install -y \
|
|
|
|
g++-mingw-w64-i686 \
|
|
|
|
gcc-mingw-w64-i686
|
2017-02-16 18:18:17 +08:00
|
|
|
fi
|
|
|
|
|
2020-05-10 00:50:48 +08:00
|
|
|
if [ "$SUPPORT_ARCH_x86_64" = "true" ]; then
|
2021-02-22 10:15:13 +08:00
|
|
|
apt-get install -y \
|
|
|
|
g++-mingw-w64-x86-64 \
|
|
|
|
gcc-mingw-w64-x86-64
|
2017-02-16 18:18:17 +08:00
|
|
|
fi
|
|
|
|
|
2018-09-19 11:15:50 +08:00
|
|
|
# Packages needed for running toxcore tests
|
2020-05-10 00:50:48 +08:00
|
|
|
if [ "$SUPPORT_TEST" = "true" ]; then
|
2021-02-22 10:15:13 +08:00
|
|
|
apt-get install -y \
|
|
|
|
texinfo
|
|
|
|
|
|
|
|
dpkg --add-architecture i386
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y \
|
|
|
|
wine \
|
|
|
|
wine32 \
|
|
|
|
wine64
|
2017-02-16 18:18:17 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Clean up to reduce image size
|
|
|
|
apt-get clean
|
|
|
|
rm -rf \
|
2021-02-22 10:15:13 +08:00
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
/tmp/* \
|
|
|
|
/var/tmp/*
|