2016-07-13 20:12:11 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e -x
|
|
|
|
|
|
|
|
# Set up opam.
|
|
|
|
opam init -y
|
|
|
|
eval `opam config env`
|
|
|
|
|
|
|
|
# Install required opam packages.
|
|
|
|
opam install -y ocamlfind ppx_deriving menhir
|
|
|
|
|
|
|
|
# Build apidsl.
|
2016-07-13 21:18:03 +08:00
|
|
|
git clone --depth=1 https://github.com/iphydf/apidsl ../apidsl
|
|
|
|
make -C ../apidsl
|
2016-07-13 20:12:11 +08:00
|
|
|
|
|
|
|
# Install cpp-coveralls to upload test coverage results.
|
|
|
|
pip install --user cpp-coveralls
|
|
|
|
|
|
|
|
# Install astyle (version in ubuntu-precise too old).
|
|
|
|
[ -f $ASTYLE ] || {
|
2016-07-13 21:18:03 +08:00
|
|
|
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
|
2016-07-13 20:12:11 +08:00
|
|
|
make -C $CACHE_DIR/astyle/build/gcc
|
|
|
|
}
|
|
|
|
|
|
|
|
# Install libsodium (not in ubuntu-precise).
|
|
|
|
[ -f $CACHE_DIR/lib/libsodium.a ] || {
|
2016-07-13 21:18:03 +08:00
|
|
|
git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium ../libsodium
|
|
|
|
cd ../libsodium # pushd
|
2016-07-13 20:12:11 +08:00
|
|
|
./autogen.sh
|
|
|
|
./configure --prefix=$CACHE_DIR
|
|
|
|
make install -j3
|
2016-07-13 21:18:03 +08:00
|
|
|
cd - # popd
|
2016-07-13 20:12:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# Install libconfig (version in ubuntu-precise too old).
|
|
|
|
[ -f $CACHE_DIR/lib/libconfig.a ] || {
|
2016-07-13 21:18:03 +08:00
|
|
|
git clone --depth=1 --branch=REL1_6_STABLE https://github.com/hyperrealm/libconfig ../libconfig
|
|
|
|
cd ../libconfig # pushd
|
2016-07-13 20:12:11 +08:00
|
|
|
autoreconf -fi
|
|
|
|
./configure --prefix=$CACHE_DIR
|
|
|
|
touch lib/scanner.l
|
|
|
|
make install -j3
|
2016-07-13 21:18:03 +08:00
|
|
|
cd - # popd
|
2016-07-13 20:12:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# Install libopus (not in ubuntu-precise).
|
|
|
|
[ -f $CACHE_DIR/lib/libopus.a ] || {
|
2016-07-13 21:18:03 +08:00
|
|
|
git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus ../opus
|
|
|
|
cd ../opus # pushd
|
2016-07-13 20:12:11 +08:00
|
|
|
./autogen.sh
|
|
|
|
./configure --prefix=$CACHE_DIR
|
|
|
|
make install -j3
|
2016-07-13 21:18:03 +08:00
|
|
|
cd - # popd
|
2016-07-13 20:12:11 +08:00
|
|
|
}
|