diff options
author | 2021-07-15 11:47:19 +0200 | |
---|---|---|
committer | 2021-07-16 10:10:37 +0200 | |
commit | f62e74657d802555db61345eaa46362b09b12e88 (patch) | |
tree | 8ce3ac8d041c789cae6fa4571fed668f44c0fd15 /scripts/functions.sh | |
parent | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (diff) |
[HICN-714] Update build scriptsv21.06-rc0
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Ica3b4f66087446551230a3742fd7bd4db87a4a7e
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'scripts/functions.sh')
-rw-r--r-- | scripts/functions.sh | 66 |
1 files changed, 24 insertions, 42 deletions
diff --git a/scripts/functions.sh b/scripts/functions.sh index 9cb62b5cc..abb34fb7b 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -44,9 +44,7 @@ VPP_VERSION_RPM="${VPP_VERSION_DEB}.x86_64" DEPS_UBUNTU=("build-essential" "doxygen" "curl" - "libparc-dev" - "libmemif-dev" - "libmemif" + "cmake" "libasio-dev" "libconfig-dev" "libconfig++-dev" @@ -54,27 +52,17 @@ DEPS_UBUNTU=("build-essential" "libevent-dev" "libssl-dev" "ninja-build" - "vpp=${VPP_VERSION_DEB}" - "vpp-dev=${VPP_VERSION_DEB}" - "libvppinfra=${VPP_VERSION_DEB}" - "libvppinfra-dev=${VPP_VERSION_DEB}" - "vpp-plugin-core=${VPP_VERSION_DEB}" "python3-ply") -# BUILD_TOOLS_GROUP_CENTOS="'Development Tools'" -DEPS_CENTOS=("vpp-devel-${VPP_VERSION_RPM}" - "vpp-lib-${VPP_VERSION_RPM}" - "libparc-devel" - "curl" - "libmemif-devel" - "ninja-build" - "libmemif" - "libcurl-devel" - "asio-devel" - "libconfig-devel" - "dnf-plugins-core" - "bzip2" - "rpm-build") +DEPS_UBUNTU_PKGCLOUD=("libparc-dev" + "libmemif-dev" + "libmemif" + "vpp=${VPP_VERSION_DEB}" + "vpp-dev=${VPP_VERSION_DEB}" + "libvppinfra=${VPP_VERSION_DEB}" + "libvppinfra-dev=${VPP_VERSION_DEB}" + "vpp-plugin-core=${VPP_VERSION_DEB}" + "libparc-dev") COLLECTD_SOURCE="https://github.com/collectd/collectd/releases/download/collectd-5.12.0/collectd-5.12.0.tar.bz2" @@ -89,16 +77,6 @@ function install_collectd_headers() { export COLLECTD_HOME=${PWD}/collectd-5.12.0/src } -function install_cmake() { - [[ $(uname --hardware-platform) = "x86_64" ]] || return 0 - CMAKE_INSTALL_SCRIPT_URL="https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.sh" - CMAKE_INSTALL_SCRIPT="/tmp/install_cmake.sh" - curl -L ${CMAKE_INSTALL_SCRIPT_URL} > ${CMAKE_INSTALL_SCRIPT} - - sudo mkdir -p ${CMAKE_INSTALL_DIR} - sudo bash ${CMAKE_INSTALL_SCRIPT} --skip-license --prefix=${CMAKE_INSTALL_DIR} -} - function setup_fdio_repo() { DISTRIB_ID=${ID} @@ -117,16 +95,12 @@ function setup_fdio_repo() { # Install dependencies function install_deps() { DISTRIB_ID=${ID} + echo ${DEPS_UBUNTU[@]} | xargs sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends +} - if [ ${DISTRIB_ID} == "ubuntu" ]; then - echo ${DEPS_UBUNTU[@]} | xargs sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends - elif [ ${DISTRIB_ID} == "centos" ]; then - yum config-manager --set-enabled powertools - # Temporary workaround until centos fixes the asio-devel package (https://forums.centos.org/viewtopic.php?t=73034) - curl -L http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/asio-devel-1.10.8-7.module_el8.1.0+217+4d875839.x86_64.rpm > /tmp/asio-devel-1.10.8-7.module_el8.1.0+217+4d875839.x86_64.rpm - yum localinstall -y --nogpgcheck /tmp/asio-devel-1.10.8-7.module_el8.1.0+217+4d875839.x86_64.rpm - echo ${DEPS_CENTOS[@]} | xargs sudo yum install -y --nogpgcheck - fi +function install_pkgcloud_deps() { + DISTRIB_ID=${ID} + echo ${DEPS_UBUNTU_PKGCLOUD[@]} | xargs sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends } # Call a function once @@ -147,6 +121,14 @@ function setup() { call_once setup_fdio_repo call_once install_deps - call_once install_cmake + call_once install_pkgcloud_deps + call_once install_collectd_headers +} + +function setup_extras() { + echo DISTRIBUTION: ${PRETTY_NAME} + # export variables depending on the platform we are running + + call_once install_deps call_once install_collectd_headers } |