Neels Hofmeyr | dae3d3c | 2017-03-28 12:16:58 +0200 | [diff] [blame^] | 1 | set -x -e |
| 2 | |
| 3 | base="$PWD" |
| 4 | inst="inst-osmo-bts-trx" |
| 5 | prefix="$base/$inst" |
| 6 | |
| 7 | deps=" |
| 8 | libosmocore |
| 9 | libosmo-abis |
| 10 | osmo-trx |
| 11 | osmo-bts |
| 12 | " |
| 13 | |
| 14 | have_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.* |
| 29 | have_repo openbsc |
| 30 | |
| 31 | |
| 32 | rm -rf "$prefix" |
| 33 | mkdir -p "$prefix" |
| 34 | |
| 35 | export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" |
| 36 | export LD_LIBRARY_PATH="$prefix/lib" |
| 37 | |
| 38 | for 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 |
| 56 | done |
| 57 | |
| 58 | # build the archive that is going to be copied to the tester |
| 59 | cd "$base" |
| 60 | rm -f osmo-bts-trx*.tgz |
| 61 | tar czf "osmo-bts-trx-build-${BUILD_NUMBER}.tgz" "$inst" |