Commit c2c68a47 authored by Navid Nikaein's avatar Navid Nikaein

fix few issues of the OAI build tool for ubuntu 12.04

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6170 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f2477eab
......@@ -157,6 +157,55 @@ make_certs(){
}
check_install_nettle(){
if [ ! -f ./.lock_oaibuild ]; then
if [ $UBUNTU_REL = "12.04" ]; then
test_uninstall_package nettle-dev
test_uninstall_package nettle-bin
if [ ! -d /usr/local/src/ ]; then
echo "/usr/local/src/ doesn't exist please create one"
exit -1
fi
if [ ! -w /usr/local/src/ ]; then
echo "You don't have permissions to write to /usr/local/src/, installing as a sudoer"
# exit -1
fi
cd /usr/local/src/
echo "Downloading nettle archive"
if [ -f nettle-2.5.tar.gz ]; then
$SUDO rm -f nettle-2.5.tar.gz
fi
if [ -f nettle-2.5.tar ]; then
$SUDO rm -f nettle-2.5.tar
fi
if [ -d nettle-2.5 ]; then
$SUDO rm -rf nettle-2.5/
fi
$SUDO wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
$SUDO gunzip nettle-2.5.tar.gz
$SUDO echo "Uncompressing nettle archive"
$SUDO tar -xf nettle-2.5.tar
cd nettle-2.5/
$SUDO ./configure --disable-openssl --enable-shared --prefix=/usr
if [ $? -ne 0 ]; then
exit -1
fi
echo "Compiling nettle"
$SUDO make -j $NUM_CPU
$SUDO make check
$SUDO make install
cd ../
fi
fi
}
check_install_freediamter(){
if [ $UBUNTU_REL = "12.04" ]; then
......@@ -647,12 +696,17 @@ compile_ltesoftmodem() {
make $SOFTMODEM_DIRECTIVES
make -j $NUM_CPU $SOFTMODEM_DIRECTIVES
if [ $? -ne 0 ]; then
if [ ! -f ./lte-softmodem ]; then
echo_error "Build lte-softmodem failed, returning"
return 1
else
cp -f ./lte-softmodem $OPENAIR_TARGETS/bin
return 0
fi
else
cp -f ./lte-softmodem $OPENAIR_TARGETS/bin
return 0
fi
else
echo_error "make file for oai softmodem not found, returning"
return 1
......
......@@ -312,6 +312,7 @@ build_enb(){
check_install_usrp_uhd_driver
fi
check_install_asn1c
check_install_nettle
############################################
# compile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment