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 \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
ca-certificates \
|
|
|
|
cmake \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
libc-dev \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
tree \
|
|
|
|
yasm
|
|
|
|
|
|
|
|
# Arch-dependent packages required for building toxcore's dependencies and toxcore itself
|
|
|
|
if [ "${SUPPORT_ARCH_i686}" = "true" ]; then
|
|
|
|
apt-get install -y \
|
|
|
|
g++-mingw-w64-i686 \
|
|
|
|
gcc-mingw-w64-i686
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${SUPPORT_ARCH_x86_64}" = "true" ]; then
|
|
|
|
apt-get install -y \
|
|
|
|
g++-mingw-w64-x86-64 \
|
|
|
|
gcc-mingw-w64-x86-64
|
|
|
|
fi
|
|
|
|
|
2018-09-19 11:15:50 +08:00
|
|
|
# Packages needed for running toxcore tests
|
2017-02-16 18:18:17 +08:00
|
|
|
if [ "${SUPPORT_TEST}" = "true" ]; then
|
|
|
|
apt-get install -y \
|
2018-01-15 06:23:46 +08:00
|
|
|
apt-transport-https \
|
2017-02-16 18:18:17 +08:00
|
|
|
curl \
|
2018-01-15 06:23:46 +08:00
|
|
|
gnupg \
|
2017-02-16 18:18:17 +08:00
|
|
|
texinfo
|
|
|
|
|
2018-01-15 06:23:46 +08:00
|
|
|
# Add Wine package repository to use the latest Wine
|
2018-02-18 04:44:21 +08:00
|
|
|
echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list
|
2018-01-15 06:23:46 +08:00
|
|
|
curl -o Release.key https://dl.winehq.org/wine-builds/Release.key
|
|
|
|
apt-key add Release.key
|
|
|
|
|
|
|
|
dpkg --add-architecture i386
|
|
|
|
apt-get update
|
2019-01-03 18:49:37 +08:00
|
|
|
apt-get install -y --allow-unauthenticated \
|
2018-02-18 04:44:21 +08:00
|
|
|
wine-devel \
|
|
|
|
wine-devel-amd64 \
|
|
|
|
wine-devel-dbg \
|
|
|
|
winehq-devel
|
2017-02-16 18:18:17 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Clean up to reduce image size
|
|
|
|
apt-get clean
|
|
|
|
rm -rf \
|
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
/tmp/* \
|
|
|
|
/var/tmp/*
|