#!/bin/bash
#
# Set up a fresh Ubuntu 20.04 with packages for building and developing Agora.
# This does not include installing Intel compilers and FlexRAN FEC

sudo apt update
sudo apt upgrade -y
sudo apt install -y git cmake build-essential g++ gcc
sudo apt install -y libgtest-dev libgflags-dev libboost-dev libfftw3-dev
sudo apt install -y doxygen swig graphviz qtbase5-dev libcanberra-gtk-module
sudo apt install -y liblapack-dev libopenblas-base libopenblas-dev
sudo apt install -y python3 python3-dev libpython3-dev python3-distutils python3-dbg python3-pip python3-numpy python3-matplotlib python3-h5py python3-scipy python3-testresources python3-sip-dev python-is-python3
sudo apt install -y software-properties-common avahi-daemon libavahi-client-dev
sudo apt install -y liblapack3 liblapack-doc liblapack-dev libsuperlu-dev libsuperlu-doc libsuperlu5 libarpack++2c2a libarpack2 libarpack2-dev libatlas-base-dev libatlas3-base libhdf5-dev
sudo apt install -y xserver-xorg libxft2 libnuma-dev meson libpcap-dev
sudo apt install -y libisal-dev libjansson-dev libbsd-dev libfdt-dev
sudo apt install linux-lowlatency-hwe-20.04

#3.3.1 to remove warnings generated by version 2.3.1
pip3 install --upgrade secretstorage
pip3 install pyelftools

#build gtest=
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
