Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -ex |
| 4 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 5 | base="$PWD" |
| 6 | deps="$base/deps" |
| 7 | inst="$deps/install" |
Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 8 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 9 | mkdir "$deps" || true |
| 10 | rm -rf "$inst" |
| 11 | |
| 12 | build_dep() { |
| 13 | project="$1" |
| 14 | branch="$2" |
Holger Hans Peter Freyther | 91dfa86 | 2016-07-27 20:27:02 +0800 | [diff] [blame] | 15 | cfg="$3" |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 16 | 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 Freyther | 91dfa86 | 2016-07-27 20:27:02 +0800 | [diff] [blame] | 36 | ./configure --prefix="$inst" $cfg |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 37 | $MAKE $PARALLEL_MAKE install |
| 38 | } |
| 39 | |
Holger Hans Peter Freyther | 91dfa86 | 2016-07-27 20:27:02 +0800 | [diff] [blame] | 40 | build_dep libosmocore "" ac_cv_path_DOXYGEN=false |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 41 | |
| 42 | # All below builds want this PKG_CONFIG_PATH |
| 43 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 44 | |
Neels Hofmeyr | 9759374 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 45 | if [ "x$IU" = "x--enable-iu" ]; then |
| 46 | netif_branch="sysmocom/sctp" |
| 47 | sccp_branch="sysmocom/iu" |
| 48 | fi |
| 49 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 50 | build_dep libosmo-abis |
Neels Hofmeyr | 9759374 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 51 | build_dep libosmo-netif $netif_branch |
| 52 | build_dep libosmo-sccp $sccp_branch |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 53 | PARALLEL_MAKE="" build_dep libsmpp34 |
| 54 | build_dep openggsn |
| 55 | |
Neels Hofmeyr | 9759374 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 56 | if [ "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 |
| 60 | fi |
| 61 | |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 62 | cd "$base" |
| 63 | cd openbsc |
Holger Hans Peter Freyther | a47b401 | 2016-04-13 19:03:38 -0400 | [diff] [blame] | 64 | autoreconf --install --force |
Neels Hofmeyr | 9759374 | 2016-07-11 19:44:58 +0200 | [diff] [blame] | 65 | ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests |
Neels Hofmeyr | a3d93ed | 2016-07-11 19:39:51 +0200 | [diff] [blame] | 66 | $MAKE $PARALLEL_MAKE |
| 67 | LD_LIBRARY_PATH="$inst/lib" $MAKE check |
| 68 | LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck |