blob: 3c60996dc10b69b2750f98e6bc66dff6762e9d59 [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"
Holger Hans Peter Freyther91dfa862016-07-27 20:27:02 +080015 cfg="$3"
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020016 set +x
17 echo
18 echo
19 echo
20 echo " =============================== $project ==============================="
21 echo
22 set -x
23 if [ -z "$project" ]; then
24 echo "internal failure"
25 exit 1
26 fi
27 cd "$deps"
28 rm -rf "$project"
29 osmo-deps.sh "$project"
30 cd "$project"
31 if [ -n "$branch" ]; then
32 git checkout "$branch"
33 fi
34 git rev-parse HEAD
35 autoreconf --install --force
Holger Hans Peter Freyther91dfa862016-07-27 20:27:02 +080036 ./configure --prefix="$inst" $cfg
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020037 $MAKE $PARALLEL_MAKE install
38}
39
Holger Hans Peter Freyther91dfa862016-07-27 20:27:02 +080040build_dep libosmocore "" ac_cv_path_DOXYGEN=false
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020041
42# All below builds want this PKG_CONFIG_PATH
43export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
44
Neels Hofmeyr97593742016-07-11 19:44:58 +020045if [ "x$IU" = "x--enable-iu" ]; then
46 netif_branch="sysmocom/sctp"
47 sccp_branch="sysmocom/iu"
48fi
49
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020050build_dep libosmo-abis
Neels Hofmeyr97593742016-07-11 19:44:58 +020051build_dep libosmo-netif $netif_branch
52build_dep libosmo-sccp $sccp_branch
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020053PARALLEL_MAKE="" build_dep libsmpp34
54build_dep openggsn
55
Neels Hofmeyr97593742016-07-11 19:44:58 +020056if [ "x$IU" = "x--enable-iu" ]; then
57 build_dep libasn1c
58 #build_dep asn1c aper-prefix # only needed for make regen in osmo-iuh
59 build_dep osmo-iuh
60fi
61
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020062cd "$base"
63cd openbsc
Holger Hans Peter Freythera47b4012016-04-13 19:03:38 -040064autoreconf --install --force
Neels Hofmeyr97593742016-07-11 19:44:58 +020065./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests
Neels Hofmeyra3d93ed2016-07-11 19:39:51 +020066$MAKE $PARALLEL_MAKE
67LD_LIBRARY_PATH="$inst/lib" $MAKE check
68LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck