blob: b2b215b36da78d766f8b91d0c73b11cac02e05ee [file] [log] [blame]
Neels Hofmeyrdae3d3c2017-03-28 12:16:58 +02001set -x -e
2
3base="$PWD"
4inst="inst-osmo-bts-trx"
5prefix="$base/$inst"
6
7deps="
8libosmocore
9libosmo-abis
10osmo-trx
11osmo-bts
12"
13
14have_repo() {
15 repo="$1"
16 cd "$base"
17 if [ ! -e "$repo" ]; then
18 set +x
19 echo "MISSING REPOSITORY: $repo"
20 echo "should be provided by the jenkins workspace"
21 exit 1
22 fi
23 cd "$repo"
24 git clean -dxf
25 cd "$base"
26}
27
28# for gsm_data_shared.*
29have_repo openbsc
30
31
32rm -rf "$prefix"
33mkdir -p "$prefix"
34
35export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
36export LD_LIBRARY_PATH="$prefix/lib"
37
38for dep in $deps; do
39 have_repo "$dep"
40 cd "$dep"
41
42 echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-bts-trx_osmo-trx_git_hashes.txt"
43
44 autoreconf -fi
45
46 config_opts=""
47
48 case "$repo" in
49 'osmo-bts') config_opts="--enable-trx --with-openbsc=$base/openbsc/openbsc/include" ;;
50 'osmo-trx') config_opts="--without-sse" ;;
51 esac
52
53 ./configure --prefix="$prefix" $config_opts
54 make -j8
55 make install
56done
57
58# build the archive that is going to be copied to the tester
59cd "$base"
60rm -f osmo-bts-trx*.tgz
61tar czf "osmo-bts-trx-build-${BUILD_NUMBER}.tgz" "$inst"