summaryrefslogtreecommitdiffstats
path: root/coverity/build_Osmocom.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-01 01:34:41 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-01 01:58:19 +0200
commita7e0987f682adf7e5da1214030e5999a9818ed7c (patch)
tree77d1b977dd51ef566fce9f7364e2d9cd0af25f94 /coverity/build_Osmocom.sh
parent5c0f21fb1d2ddbf5c973b36cef962b0d2c063946 (diff)
coverity: rename iuh build to Osmocom
This corresponds to the scan.coverity project name this is uploaded to. Also apply renaming in file content: call renamed build_Osmocom.sh, use dir source-Osmocom and install-Osmocom, use a token named 'Osmocom'. The point is that the combined build of all osmocom projects finds problems more accurately, since coverity can analyse across all libraries at the same time. Still build the iuh branches, since they are basically an extension of the current master branches (given that they are rebased onto master regularly, which they currently are). Name the generated tar Osmocom.tgz instead of myproject.tgz. Change-Id: If316d54327cca8aa1b499bf35b6b22385bd83702
Diffstat (limited to 'coverity/build_Osmocom.sh')
-rwxr-xr-xcoverity/build_Osmocom.sh157
1 files changed, 157 insertions, 0 deletions
diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh
new file mode 100755
index 0000000..40e1e5e
--- /dev/null
+++ b/coverity/build_Osmocom.sh
@@ -0,0 +1,157 @@
+#!/usr/bin/env bash
+
+set -e -x
+
+base_dir="$PWD"
+src_dir="$base_dir/source-Osmocom"
+prefix="$base_dir/install-Osmocom"
+
+install -d "$prefix"
+
+export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
+
+do_build() {
+ git clean -dxf
+ git checkout .
+ git remote prune origin
+ git pull --rebase -s recursive -Xtheirs
+ autoreconf --install --force
+ ./configure --prefix="$prefix" $*
+
+ make
+ make install
+}
+
+build_layer1api() {
+ pushd layer1-api
+ install -d "$prefix/include/sysmocom/femtobts/"
+ cp include/*.h "$prefix/include/sysmocom/femtobts/"
+ popd
+}
+
+build_asn1c() {
+ pushd asn1c
+ do_build
+ popd
+}
+
+build_libasn1c() {
+ pushd libasn1c
+ do_build
+ sed -i s,'#include "config.h"','/*#include "config.h"*/', "$prefix/include/asn1c/asn_system.h"
+ popd
+}
+
+build_osmoiuh() {
+ pushd osmo-iuh
+ do_build
+ popd
+}
+
+build_libosmocore() {
+ pushd libosmocore
+
+ do_build
+ popd
+}
+
+build_libosmoabis() {
+ pushd libosmo-abis
+
+ do_build
+ popd
+}
+
+build_libosmosccp() {
+ pushd libosmo-sccp
+
+ do_build
+ popd
+}
+
+build_openggsn() {
+ pushd openggsn
+ do_build
+ popd
+}
+
+build_openbsc() {
+ pushd openbsc/openbsc
+ git checkout sysmocom/iu
+
+ do_build --enable-osmo-bsc --enable-nat --enable-smpp --enable-mgcp-transcoding --enable-iu
+ popd
+}
+
+build_osmobts() {
+ pushd openbsc/openbsc
+ git checkout master
+ git pull --rebase
+ popd
+ pushd osmo-bts
+
+ do_build --enable-sysmocom-bts --with-openbsc="$src_dir/openbsc/openbsc/include"
+ popd
+}
+
+build_osmopcu() {
+ pushd osmo-pcu
+
+ do_build --enable-sysmocom-bts=yes --enable-sysmocom-dsp=yes
+ popd
+}
+
+build_libosmodsp() {
+ pushd libosmo-dsp
+ do_build
+ popd
+}
+
+build_libosmonetif() {
+ pushd libosmo-netif
+ do_build
+ popd
+}
+
+build_osmogmr() {
+ pushd osmo-gmr
+ do_build
+ popd
+}
+
+build_libsmpp34() {
+ pushd libsmpp34
+ do_build
+ popd
+}
+
+build_osmosipconnector() {
+ pushd osmo-sip-connector
+ do_build
+ popd
+}
+
+cd "$src_dir"
+
+rm -rf "$prefix"
+
+build_layer1api
+build_asn1c
+build_libosmocore
+build_libasn1c
+build_libosmoabis
+build_libosmonetif
+build_libosmosccp
+build_libsmpp34
+build_openggsn
+build_osmoiuh
+build_osmopcu
+build_osmobts
+build_openbsc
+
+# GMR
+build_libosmodsp
+build_osmogmr
+
+# MNCC to SIP
+build_osmosipconnector