File: deps.sh

package info (click to toggle)
libtoxcore 0.2.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,992 kB
  • sloc: ansic: 70,235; cpp: 14,770; sh: 1,576; python: 649; makefile: 255; perl: 39
file content (30 lines) | stat: -rwxr-xr-x 685 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

set -eux -o pipefail

SYSTEM="$1"
ARCH="$2"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

DEP_PREFIX="$PWD/deps-prefix-$SYSTEM-$ARCH"

if [ -d "$DEP_PREFIX" ]; then
  exit 0
fi

if [ -d ../dockerfiles ]; then
  DOCKERFILES="$(realpath ../dockerfiles)"
else
  git clone --depth=1 https://github.com/TokTok/dockerfiles "$SCRIPT_DIR/dockerfiles"
  DOCKERFILES="$SCRIPT_DIR/dockerfiles"
fi

for dep in sodium opus vpx; do
  mkdir -p "external/$dep"
  pushd "external/$dep"
  SCRIPT="$DOCKERFILES/qtox/build_$dep.sh"
  "$SCRIPT" --arch "$SYSTEM-$ARCH" --libtype "static" --buildtype "release" --prefix "$DEP_PREFIX" --macos "10.15"
  popd
  rm -rf "external/$dep"
done