mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-07-28 19:38:45 +00:00
* Initial implementation * Multiple fixes and improvemens * Better `curl` retries timing * Remove unused `TARGETOS` and `TARGETVARIANT` vars; add the version fetch fallback code to the build scripts * Move the fallback code before the var usage * Use double braces to make the code compatible with the `set -u` --------- Co-authored-by: Konstantin Koval
33 lines
716 B
Bash
Executable File
33 lines
716 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
: "${TARGETPLATFORM:=linux/$(dpkg --print-architecture)}"
|
|
: "${DEB_HOST_MULTIARCH:=$(uname -m)-linux-gnu}"
|
|
|
|
TARGETARCH="$(echo "$TARGETPLATFORM" | cut -d"/" -f2)"
|
|
|
|
DEBIAN_ARCH=$TARGETARCH
|
|
if [ "$TARGETARCH" = "arm" ]; then
|
|
DEBIAN_ARCH=armel
|
|
fi
|
|
|
|
dpkg --add-architecture "$DEBIAN_ARCH"
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
ca-certificates \
|
|
crossbuild-essential-"${DEBIAN_ARCH}" \
|
|
libc-dev:"${DEBIAN_ARCH}" \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
m4 \
|
|
pkg-config \
|
|
cmake
|
|
|
|
dpkg-architecture -a "$DEBIAN_ARCH" >/env
|
|
echo "PKG_CONFIG_PATH=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig" >>/env
|
|
# shellcheck disable=SC2046
|
|
export $(cat /env)
|
|
cat /env
|