From 1dea17fe921e1f94db63e4c563fe08dd25734900 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 1 Feb 2019 09:40:26 +0000 Subject: [HICN-10] Add support for building hicn-plugin packages. Do not build packages for components without name. Change-Id: I11eff1b9dc6e71e079baf65703192a7cbfb565e8 Signed-off-by: Mauro Sardara --- cmake/Modules/Packager.cmake | 10 +++++++++- hicn-plugin/cmake/Modules/Packaging.cmake | 4 ++-- libtransport/CMakeLists.txt | 4 ++-- scripts/build-packages.sh | 11 +++++++---- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake index c04e5c0b0..15b5951fa 100644 --- a/cmake/Modules/Packager.cmake +++ b/cmake/Modules/Packager.cmake @@ -82,6 +82,10 @@ macro(make_packages) set(CPACK_PACKAGE_VERSION "${deb_ver}") foreach(lc ${components}) + if (${lc} MATCHES "Unspecified.*") + continue() + endif() + string(TOUPPER ${lc} uc) set(CPACK_${type}_${uc}_FILE_NAME "${lc}_${deb_ver}_${arch}.deb") @@ -106,6 +110,10 @@ macro(make_packages) set(CPACK_PACKAGE_VERSION "${rpm_ver}") foreach(lc ${components}) + if (${lc} MATCHES "Unspecified.*") + continue() + endif() + string(TOUPPER ${lc} uc) set(CPACK_${type}_${uc}_DESCRIPTION "${${lc}_DESCRIPTION}") @@ -138,4 +146,4 @@ macro(make_packages) include(CPack) endif() endif() -endmacro() \ No newline at end of file +endmacro() diff --git a/hicn-plugin/cmake/Modules/Packaging.cmake b/hicn-plugin/cmake/Modules/Packaging.cmake index ce3b69f8f..89b8d974b 100644 --- a/hicn-plugin/cmake/Modules/Packaging.cmake +++ b/hicn-plugin/cmake/Modules/Packaging.cmake @@ -21,11 +21,11 @@ set(${HICN_PLUGIN}_DESCRIPTION ) set(${HICN_PLUGIN}_DEB_DEPENDENCIES - "libhicn (>= stable_version), vpp (== stable_version-release), vpp-plugins (== stable_version-release)" + "libhicn (>= stable_version), vpp (= stable_version-release), vpp-plugins (= stable_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(${HICN_PLUGIN}_RPM_DEPENDENCIES "libhicn >= stable_version, vpp = stable_version-release, vpp-plugins = stable_version-release" CACHE STRING "Dependencies for deb/rpm package." -) \ No newline at end of file +) diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt index c5cb95260..4df87b056 100644 --- a/libtransport/CMakeLists.txt +++ b/libtransport/CMakeLists.txt @@ -44,7 +44,7 @@ set(raaqm_config_path ${CMAKE_INSTALL_PREFIX}/etc/hicn-consumer.conf) # Install includes set(INSTALL_INCLUDE_DIR include/hicn/transport) -if ((BUILD_MEMIF_CONNECTOR OR BUILD_VPP_PLUGIN) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") +if (BUILD_VPP_PLUGIN AND BUILD_MEMIF_CONNECTOR AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(__vpp__ 1) find_package(Vpp REQUIRED) find_package(Libmemif REQUIRED) @@ -116,4 +116,4 @@ list(APPEND LIBTRANSPORT_INCLUDE_DIRS ${WINDOWS_INCLUDE_DIRS} ) -add_subdirectory(${TRANSPORT_ROOT_PATH}) \ No newline at end of file +add_subdirectory(${TRANSPORT_ROOT_PATH}) diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index b199f99e8..e41eccc8a 100644 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -21,12 +21,15 @@ apt_get=${APT_PATH:-"/usr/local/bin/apt-get"} PACKAGECLOUD_RELEASE_REPO_DEB="https://packagecloud.io/install/repositories/fdio/release/script.deb.sh" PACKAGECLOUD_RELEASE_REPO_RPM="https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh" +VPP_VERSION_DEB="19.01-release" +VPP_VERSION_RPM="19.01-release.x86_64" + BUILD_TOOLS_UBUNTU="build-essential doxygen" LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev" -DEPS_UBUNTU="libparc-dev libasio-dev" +DEPS_UBUNTU="libparc-dev libasio-dev vpp-dev=${VPP_VERSION_DEB} vpp-lib=${VPP_VERSION_DEB}" # BUILD_TOOLS_GROUP_CENTOS="'Development Tools'" -DEPS_CENTOS="libparc-devel asio-devel centos-release-scl devtoolset-7" +DEPS_CENTOS="vpp-devel-${VPP_VERSION_RPM} vpp-lib-${VPP_VERSION_RPM} libparc-devel asio-devel centos-release-scl devtoolset-7" LATEST_EPEL_REPO="http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" install_cmake() { @@ -122,7 +125,7 @@ build_package() { mkdir -p ${SCRIPT_PATH}/../build && pushd ${SCRIPT_PATH}/../build rm -rf * - cmake -DCMAKE_INSTALL_PREFIX=/usr .. + cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_VPP_PLUGIN=ON .. make package find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true @@ -140,4 +143,4 @@ pushd ${SCRIPT_PATH}/.. build_package popd -exit 0 \ No newline at end of file +exit 0 -- cgit 1.2.3-korg