Files
5g-images/oai-enb/scripts/build_missing_packages
Carlos Giraldo 05f6862e0f Initial commit
2020-10-22 08:44:41 +02:00

76 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
set -x
set -euo pipefail
SCRIPT_DIR=$(dirname $(readlink -f $0))
source /etc/os-release
PLATFORM=${ID#rh*}${VERSION_ID%.*}
function build_install_asn1c {
rm -rf /tmp/asn1c_oai
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
cd /tmp/asn1c
git checkout 0a7524184f16e7093990a31d8d4db487a16e5782
autoreconf -iv
./configure
make -j`nproc`
make install
}
function build_install_freediameter {
rm -rf /tmp/freediameter
GIT_SSL_NO_VERIFY=true git clone --branch=eurecom-1.2.0 https://gitlab.eurecom.fr/oai/freediameter.git /tmp/freediameter
cd /tmp/freediameter
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter_eurecom-1.2.0_0001-S6a-dictionary-add-CLR-Flags.patch
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter_compatibility-1.2.0_patch_0001-S6a-dictionary-avp493.patch
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter-1.x_api-fix.patch
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../
make -j`nproc`
make install
}
function build_install_liblfds {
rm -rf /tmp/liblfds*
git clone https://github.com/liblfds/liblfds.git /tmp/liblfds
cd /tmp/liblfds/liblfds/liblfds7.1.0/liblfds710/build/gcc_gnumake
make so_dbg
make so_install
}
function build_install_folly {
rm -rf /tmp/folly
git clone --depth=1 --branch=v2019.06.17.00 https://github.com/facebook/folly.git /tmp/folly
git clone --depth=1 --branch=release-1.8.0 https://github.com/google/googletest.git /tmp/folly/folly/test/gtest
cd /tmp/folly
#patch -p1 < ${SCRIPT_DIR}/../patches/folly-gflagslib-fix.patch
mkdir -p _build
cd _build
cmake ..
make -j`nproc`
make install
}
function build_install_libuv {
rm -rf /tmp/libuv
git clone --depth=1 --branch=v1.23.1 https://github.com/libuv/libuv.git /tmp/libuv
cd /tmp/libuv
mkdir -p build
cd build
cmake ..
make -j`nproc`
make install
}
build_install_asn1c
build_install_freediameter
build_install_liblfds
build_install_folly
build_install_libuv