blob: 00cf2c8f22f9b9592bc4e5e51ac9d9197b7fbb15 [file] [log] [blame]
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -04001#!/usr/bin/env bash
2
3set -ex
4
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +02005base="$PWD"
6deps="$base/deps"
7inst="$deps/install"
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -04008
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +02009mkdir "$deps" || true
10rm -rf "$inst"
11
12build_dep() {
13 project="$1"
14 branch="$2"
15 set +x
16 echo
17 echo
18 echo
19 echo " =============================== $project ==============================="
20 echo
21 set -x
22 if [ -z "$project" ]; then
23 echo "internal failure"
24 exit 1
25 fi
26 cd "$deps"
27 rm -rf "$project"
28 osmo-deps.sh "$project"
29 cd "$project"
30 if [ -n "$branch" ]; then
31 git checkout "$branch"
32 fi
33 git rev-parse HEAD
34 autoreconf --install --force
35 ./configure --prefix="$inst"
36 $MAKE $PARALLEL_MAKE install
37}
38
39build_dep libosmocore
40
41# All below builds want this PKG_CONFIG_PATH
42export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
43
44build_dep libosmo-abis
45build_dep libosmo-netif
46build_dep libosmo-sccp
47PARALLEL_MAKE="" build_dep libsmpp34
48build_dep openggsn
49
50cd "$base"
51cd openbsc
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -040052autoreconf --install --force
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020053./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP --enable-vty-tests --enable-external-tests
54$MAKE $PARALLEL_MAKE
55LD_LIBRARY_PATH="$inst/lib" $MAKE check
56LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck