diff options
-rw-r--r-- | cmake/Modules/Packager.cmake | 22 | ||||
-rw-r--r-- | hicn-plugin/cmake/Modules/Packaging.cmake | 4 | ||||
-rw-r--r-- | libtransport/cmake/Modules/Packaging.cmake | 8 | ||||
-rw-r--r-- | scripts/build-packages.sh | 5 |
4 files changed, 29 insertions, 10 deletions
diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake index b19145025..b4849963d 100644 --- a/cmake/Modules/Packager.cmake +++ b/cmake/Modules/Packager.cmake @@ -19,7 +19,23 @@ set(CONTACT "hicn-dev@lists.fd.io" CACHE STRING "Contact") set(PACKAGE_MAINTAINER "ICN Team" CACHE STRING "Maintainer") set(PACKAGE_VENDOR "fd.io" CACHE STRING "Vendor") -# macro(set) +function(get_next_version VERSION NEXT_VERSION) + string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1;\\2" VER_NUMBERS ${VERSION}) + + # Increment version for getting next version value + list(GET VER_NUMBERS 0 major) + list(GET VER_NUMBERS 1 minor) + + math(EXPR minor "${minor} + 3") + + if (minor GREATER 12) + set(minor "1") + math(EXPR major "${major} + 1") + endif() + + set(minor "0${minor}") + set(${NEXT_VERSION} "${major}.${minor}" PARENT_SCOPE) +endfunction() macro(make_packages) if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") @@ -68,6 +84,8 @@ macro(make_packages) set(rpm_ver "${tag}-${commit_num}-release") endif() + get_next_version(${tag}, next_version) + get_cmake_property(components COMPONENTS) if(OS_ID_LIKE MATCHES "debian") @@ -92,6 +110,7 @@ macro(make_packages) set(DEB_DEPS) if (NOT ${${lc}_DEB_DEPENDENCIES} STREQUAL "") string(REPLACE "stable_version" ${tag} DEB_DEPS ${${lc}_DEB_DEPENDENCIES}) + string(REPLACE "next_version" ${next_version} DEB_DEPS ${DEB_DEPS}) endif() set(CPACK_${type}_${uc}_PACKAGE_DEPENDS "${DEB_DEPS}") @@ -120,6 +139,7 @@ macro(make_packages) set(RPM_DEPS) if (NOT ${${lc}_DEB_DEPENDENCIES} STREQUAL "") string(REPLACE "stable_version" ${tag} RPM_DEPS ${${lc}_RPM_DEPENDENCIES}) + string(REPLACE "next_version" ${next_version} RPM_DEPS ${RPM_DEPS}) endif() set(CPACK_${type}_${uc}_PACKAGE_REQUIRES "${RPM_DEPS}") diff --git a/hicn-plugin/cmake/Modules/Packaging.cmake b/hicn-plugin/cmake/Modules/Packaging.cmake index 9ba34aeca..98996981f 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 - "vpp (= stable_version-release), vpp-plugins (= stable_version-release)" + "vpp (>= stable_version-release), vpp (< next_version-release), vpp-plugins (>= stable_version-release), vpp-plugins (< next_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(${HICN_PLUGIN}_RPM_DEPENDENCIES - "vpp = stable_version-release, vpp-plugins = stable_version-release" + "vpp >= stable_version-release, vpp < next_version-release, vpp-plugins >= stable_version-release, vpp-plugins < next_version-release" CACHE STRING "Dependencies for deb/rpm package." ) diff --git a/libtransport/cmake/Modules/Packaging.cmake b/libtransport/cmake/Modules/Packaging.cmake index 4112d3844..99dccbec4 100644 --- a/libtransport/cmake/Modules/Packaging.cmake +++ b/libtransport/cmake/Modules/Packaging.cmake @@ -32,22 +32,22 @@ set(lib${LIBTRANSPORT}-devel_DESCRIPTION ${lib${LIBTRANSPORT}_DESCRIPTION} if ((BUILD_MEMIF_CONNECTOR OR BUILD_HICNPLUGIN) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(lib${LIBTRANSPORT}_DEB_DEPENDENCIES - "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), vpp-lib (= stable_version-release)" + "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), vpp-lib (>= stable_version-release), vpp-lib (< next_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}_RPM_DEPENDENCIES - "lib${LIBHICN} >= stable_version, libparc >= 1.0, vpp-lib = stable_version-release" + "lib${LIBHICN} >= stable_version, libparc >= 1.0, vpp-lib >= stable_version-release, vpp-lib < next_version-release" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}-dev_DEB_DEPENDENCIES - "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (= stable_version-release)" + "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (>= stable_version-release), vpp-dev (< next_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}-dev_RPM_DEPENDENCIES - "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libparc-devel >= 1.0, vpp-devel = stable_version-release" + "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libparc-devel >= 1.0, vpp-devel >= stable_version-release, vpp-devel < next_version-release" CACHE STRING "Dependencies for deb/rpm package." ) diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index 67adb39e9..d628ea0e9 100644 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -24,8 +24,8 @@ PACKAGECLOUD_RELEASE_REPO_RPM="https://packagecloud.io/install/repositories/fdio VPP_GIT_REPO="https://git.fd.io/vpp" VPP_BRANCH="stable/1901" -VPP_VERSION_DEB="19.01-release" -VPP_VERSION_RPM="19.01-release.x86_64" +VPP_VERSION_DEB="19.01.1-release" +VPP_VERSION_RPM="19.01.1-release.x86_64" BUILD_TOOLS_UBUNTU="build-essential doxygen" LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev" @@ -112,7 +112,6 @@ setup() { # echo ${BUILD_TOOLS_GROUP_CENTOS} | xargs sudo yum groupinstall -y --nogpgcheck echo ${DEPS_CENTOS} | xargs sudo yum install -y --nogpgcheck sudo yum install devtoolset-7 - scl enable devtoolset-7 bash c++ --version |