mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
50921070ce
This is in preparation for having multiple types of build. One of the future builds will be a hstox build, another may be frama-c or some other static analyser. It makes sense to split these up into multiple builds, because each of them can take a while, and running them in parallel will speed things up. Also, the hstox test coverage should be reported separately from the toxcore auto_test coverage.
58 lines
1.3 KiB
Bash
Executable File
58 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e -x
|
|
|
|
cd ..
|
|
|
|
# Set up opam.
|
|
opam init -y
|
|
eval `opam config env`
|
|
|
|
# Install required opam packages.
|
|
opam install -y ocamlfind ppx_deriving menhir
|
|
|
|
# Build apidsl.
|
|
git clone --depth=1 https://github.com/iphydf/apidsl
|
|
make -C apidsl
|
|
|
|
# Install cpp-coveralls to upload test coverage results.
|
|
pip install --user cpp-coveralls
|
|
|
|
# Install astyle (version in ubuntu-precise too old).
|
|
[ -f $ASTYLE ] || {
|
|
wget -O astyle.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/astyle_2.05.1.orig.tar.gz
|
|
tar -xf astyle.tar.gz -C $CACHE_DIR
|
|
make -C $CACHE_DIR/astyle/build/gcc
|
|
}
|
|
|
|
# Install libsodium (not in ubuntu-precise).
|
|
[ -f $CACHE_DIR/lib/libsodium.a ] || {
|
|
git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium
|
|
cd libsodium
|
|
./autogen.sh
|
|
./configure --prefix=$CACHE_DIR
|
|
make install -j3
|
|
cd ..
|
|
}
|
|
|
|
# Install libconfig (version in ubuntu-precise too old).
|
|
[ -f $CACHE_DIR/lib/libconfig.a ] || {
|
|
git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig
|
|
cd libconfig
|
|
autoreconf -fi
|
|
./configure --prefix=$CACHE_DIR
|
|
touch lib/scanner.l
|
|
make install -j3
|
|
cd ..
|
|
}
|
|
|
|
# Install libopus (not in ubuntu-precise).
|
|
[ -f $CACHE_DIR/lib/libopus.a ] || {
|
|
git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus
|
|
cd opus
|
|
./autogen.sh
|
|
./configure --prefix=$CACHE_DIR
|
|
make install -j3
|
|
cd ..
|
|
}
|