diff options
author | manang <angelo.mantellini@cisco.com> | 2020-02-19 10:50:11 +0100 |
---|---|---|
committer | manang <angelo.mantellini@cisco.com> | 2020-02-20 10:44:06 +0100 |
commit | 882df3c37dc5207dcf727e7d00dcbe79a518957e (patch) | |
tree | dd27778cf4932690afc0c947b9044475e0ef0b79 /libdash | |
parent | 94cccc7a047c871103785b295d4e5c4df58f4f74 (diff) |
[CICN-29] Build viper against hicn on fdio
Signed-off-by: manang <angelo.mantellini@cisco.com>
Change-Id: Ibeca86a031eb67fd753a5f142e6f6fb601be66a4
Diffstat (limited to 'libdash')
-rw-r--r-- | libdash/scripts/build-package.sh | 102 |
1 files changed, 7 insertions, 95 deletions
diff --git a/libdash/scripts/build-package.sh b/libdash/scripts/build-package.sh index 47f6a5f4..f421df89 100644 --- a/libdash/scripts/build-package.sh +++ b/libdash/scripts/build-package.sh @@ -9,49 +9,12 @@ apt_get=${APT_PATH:-"/usr/local/bin/apt-get"} PACKAGE_NAME="VIPER" VIPER_DEPS_UBUNTU="zlib1g-dev git-core build-essential libxml2-dev libcurl4-openssl-dev \ - qt57base qt57svg qt57charts-no-lgpl qt57multimedia libqtav-dev libicnet-dev \ - libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libqml-module-qtav \ - qt57quickcontrols qt57quickcontrols2 libboost-system-dev" +libqtav-dev qt5-default libqt5svg5-dev qtdeclarative5-dev libqt5charts5-dev \ +qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 \ +libhicntransport-dev" BUILD_TOOLS="build-essential doxygen" -# Parameters: -# $1 = Distribution [Trusty / CentOS] -# -update_cmake_repo() { - - cat /etc/resolv.conf - echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf - cat /etc/resolv.conf - - CMAKE_INSTALL_SCRIPT_URL="https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.sh" - CMAKE_INSTALL_SCRIPT="/tmp/install_cmake.sh" - curl ${CMAKE_INSTALL_SCRIPT_URL} > ${CMAKE_INSTALL_SCRIPT} - - sudo mkdir -p /opt/cmake - sudo bash ${CMAKE_INSTALL_SCRIPT} --skip-license --prefix=/opt/cmake - export PATH=/opt/cmake/bin:$PATH -} - -# Parameters: -# $1 = Distribution codename -# -update_qt_repo() { - DISTRIBUTION_CODENAME=$1 - - if [ "$DISTRIBUTION_CODENAME" != "trusty" ] && [ "$DISTRIBUTION_CODENAME" != "xenial" ]; then - echo "No valid distribution specified when calling 'update_qt_repo'. Exiting.." - exit -1 - fi - - sudo ${apt_get} install -y --allow-unauthenticated software-properties-common - sudo add-apt-repository --yes ppa:beineri/opt-qt571-$DISTRIBUTION_CODENAME - - wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - - sudo sh -c "echo 'deb http://archive.getdeb.net/ubuntu xenial-getdeb apps' >> /etc/apt/sources.list.d/getdeb.list" - - sudo ${apt_get} update -} # Parameters: # $1 = Distribution id @@ -61,47 +24,13 @@ update_fdio_repo() { DISTRIB_ID=$1 DISTRIB_CODENAME=$2 - NEXUS_PROXY=${NEXUSPROXY:-"http://nexus.fd.io"} REPO_CICN_URL="" REPO_VPP_URL="" if [ "$DISTRIB_ID" == "Ubuntu" ]; then - - if [ "$DISTRIB_CODENAME" == "xenial" ]; then - REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.stable.1701.ubuntu.xenial.main/" - REPO=${REPO_NAME:-"master.ubuntu.xenial.main"} - REPO_CICN_URL="${NEXUS_PROXY}/content/repositories/fd.io.${REPO}" - elif [ "$DISTRIB_CODENAME" == "trusty" ]; then - REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.stable.1701.ubuntu.trusty.main/" - REPO=${REPO_NAME:-"master.ubuntu.trusty.main"} - REPO_CICN_URL="${NEXUS_PROXY}/content/repositories/fd.io.${REPO}" - else - echo "Distribution $DISTRIB_CODENAME is not supported" - exit -1 - fi - - echo "deb ${REPO_VPP_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list - echo "deb ${REPO_CICN_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.master.list - + curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | sudo bash elif [ "$DISTRIB_ID" == "CentOS" ]; then - REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.centos7/" - REPO=${REPO_NAME:-"master.centos7"} - REPO_CICN_URL="${NEXUS_PROXY}/content/repositories/fd.io.${REPO}" - - sudo cat << EOF > fdio.repo -[fdio-vpp-master] -name=fd.io master branch latest merge -baseurl=${REPO_VPP_URL} -enabled=1 -gpgcheck=0 - -[fdio-cicn-master] -name=fd.io master branch latest merge -baseurl=${REPO_CICN_URL} -enabled=1 -gpgcheck=0 -EOF - sudo mv fdio.repo /etc/yum.repos.d/fdio.repo + curl -s https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh | sudo bash else echo "Distribution $DISTRIB_CODENAME is not supported" exit -1 @@ -114,7 +43,6 @@ setup() { DISTRIB_ID=$1 DISTRIB_CODENAME=$2 - update_cmake_repo update_fdio_repo $DISTRIB_ID $DISTRIB_CODENAME if [ "$DISTRIB_ID" == "Ubuntu" ]; then @@ -158,39 +86,23 @@ echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION setup $DISTRIB_ID $DISTRIB_CODENAME + # Install deps if [ $DISTRIB_ID == "Ubuntu" ]; then - update_qt_repo $DISTRIB_CODENAME echo $BUILD_TOOLS $VIPER_DEPS_UBUNTU | xargs sudo ${apt_get} install -y --allow-unauthenticated else echo "This package is currently supported only for ubuntu. Exiting.." exit -1 fi -# Create links - -sudo ln -sf /usr/include/x86_64-linux-gnu/qt5/QtAV /opt/qt57/include/QtAV -sudo ln -sf /usr/include/x86_64-linux-gnu/qt5/QtAVWidgets /opt/qt57/include/QtAVWidgets -sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/av.prf /opt/qt57/mkspecs/features/av.prf -sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/avwidgets.prf /opt/qt57/mkspecs/features/avwidgets.prf -sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_avwidgets.pri /opt/qt57/mkspecs/modules/qt_lib_avwidgets.pri -sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_av.pri /opt/qt57/mkspecs/modules/qt_lib_av.pri -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQtAV.prl /opt/qt57/lib/libQtAV.prl -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQtAVWidgets.prl /opt/qt57/lib/libQtAVWidgets.prl -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQtAVWidgets.so /opt/qt57/lib/libQt5AVWidgets.so -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5AV.so /opt/qt57/lib/libQt5AV.so -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQtAV.so /opt/qt57/lib/libQtAV.so -sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5AVWidgets.so /opt/qt57/lib/libQtAVWidgets.so -sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/qml/QtAV /opt/qt57/qml/QtAV - # Compile libdash build() { mkdir -p build cd build rm -rf * - cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE .. + cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE .. -DHICNET=ON -DICNET=OFF make } |