1
Fork 0
photoview/scripts/install_build_dependencies.sh

44 lines
1.0 KiB
Bash
Raw Normal View History

2021-03-31 23:32:37 +02:00
#!/bin/bash
set -e
if [ "$TARGETPLATFORM" == "linux/arm64" ]; then
dpkg --add-architecture arm64
DEBIAN_ARCH='arm64'
elif [ "$TARGETPLATFORM" == "linux/arm/v6" ] || [ "$TARGETPLATFORM" == "linux/arm/v7" ]; then
dpkg --add-architecture armhf
DEBIAN_ARCH='armhf'
else
dpkg --add-architecture amd64
DEBIAN_ARCH='amd64'
fi
apt-get update
# Install G++/GCC cross compilers
2021-03-31 23:32:37 +02:00
if [ "$DEBIAN_ARCH" == "arm64" ]; then
apt-get install -y \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross
elif [ "$DEBIAN_ARCH" == "armhf" ]; then
apt-get install -y \
g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross
else
apt-get install -y \
g++-x86-64-linux-gnu \
libc6-dev-amd64-cross
2021-03-31 23:32:37 +02:00
fi
2021-03-31 23:32:37 +02:00
# Install go-face dependencies and libheif for HEIF media decoding
apt-get install -y \
2021-03-31 23:32:37 +02:00
libdlib-dev:${DEBIAN_ARCH} \
libblas-dev:${DEBIAN_ARCH} \
libatlas-base-dev:${DEBIAN_ARCH} \
2021-03-31 23:32:37 +02:00
liblapack-dev:${DEBIAN_ARCH} \
libjpeg-dev:${DEBIAN_ARCH} \
libheif-dev:${DEBIAN_ARCH}
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/*