Skip to content

Commit

Permalink
Manage package renaming for rpm and deb
Browse files Browse the repository at this point in the history
packages khiops-core-openmpi with a version >> 10.2.1 replace khiops-core-10.2.1 without trouble with apt and dnf

Update of the Khiops Version to 10.2.2-b0
  • Loading branch information
bruno-at-orange committed Apr 18, 2024
1 parent f493a91 commit e9aeecc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packaging/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ if(NOT IS_FEDORA_LIKE)

# We install the binary with mpi suffix and create a symlink without the suffix
get_target_property(MODL_NAME MODL OUTPUT_NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/bin/${MODL_NAME} ${CMAKE_BINARY_DIR}/MODL)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/bin/${MODL_NAME} ${TMP_DIR}/MODL)
install(
FILES ${CMAKE_BINARY_DIR}/MODL
FILES ${TMP_DIR}/MODL
DESTINATION usr/bin
COMPONENT KHIOPS_CORE)
else()
Expand All @@ -90,9 +90,9 @@ else()

# We install the binary under $MPI_BIN and create a symlink to it
get_target_property(MODL_NAME MODL OUTPUT_NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${MPI_BIN}/khiops/${MODL_NAME} ${CMAKE_BINARY_DIR}/MODL)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${MPI_BIN}/khiops/${MODL_NAME} ${TMP_DIR}/MODL)
install(
FILES ${CMAKE_BINARY_DIR}/MODL
FILES ${TMP_DIR}/MODL
DESTINATION usr/bin
COMPONENT KHIOPS_CORE)

Expand Down
7 changes: 6 additions & 1 deletion packaging/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)

# user friendly archive names
set(CPACK_ARCHIVE_KNI_FILE_NAME kni-${KHIOPS_VERSION})
set(CPACK_ARCHIVE_KNI_DOC_FILE_NAME kni-doc-${KHIOPS_VERSION})
set(CPACK_ARCHIVE_KHIOPS_FILE_NAME khiops-${KHIOPS_VERSION})
set(CPACK_ARCHIVE_KHIOPS_CORE_FILE_NAME khiops-core-${KHIOPS_VERSION})

Expand Down Expand Up @@ -103,6 +102,9 @@ set(CPACK_DEBIAN_KHIOPS_CORE_PACKAGE_NAME khiops-core${PACKAGE_SUFFIX})
set(CPACK_DEBIAN_KNI_PACKAGE_NAME kni)
set(CPACK_DEBIAN_KNI_DOC_PACKAGE_NAME kni-doc)

# manage package renaming
set(CPACK_DEBIAN_KHIOPS_CORE_PACKAGE_REPLACES "khiops-core (<< 10.2.2~ )")

# packages depends

if("${MPI_IMPL}" STREQUAL "openmpi")
Expand Down Expand Up @@ -155,6 +157,9 @@ set(CPACK_RPM_KHIOPS_CORE_PACKAGE_SUMMARY "Khiops tools (core)")
set(CPACK_RPM_KNI_PACKAGE_SUMMARY "Khiops Native Interface")
set(CPACK_RPM_KNI_DOC_PACKAGE_SUMMARY "Khiops Native Interface documentation")

# manage package renaming
set(CPACK_RPM_KHIOPS_CORE_PACKAGE_OBSOLETES "khiops-core <= 10.2.1-2")

# packages requires
set(CPACK_RPM_KHIOPS_PACKAGE_REQUIRES "khiops-core${PACKAGE_SUFFIX} = ${KHIOPS_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}")
set(CPACK_RPM_KHIOPS_PACKAGE_REQUIRES "java >= 1.8")
Expand Down
2 changes: 1 addition & 1 deletion src/Learning/KWUtils/KWKhiopsVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// dans le TaskManager de Windows (par exemple)

// Version de Khiops
#define KHIOPS_VERSION KHIOPS_STR(10.2.1)
#define KHIOPS_VERSION KHIOPS_STR(10.2.2-b0)
// Les versions release distribuees sont bases sur trois numeros, par exemple KHIOPS_STR(10.2.0)
// Les versions alpha, beta ou release candidate ont un suffixe supplementaire, par exemple :
// - KHIOPS_STR(10.5.0-a1)
Expand Down

0 comments on commit e9aeecc

Please sign in to comment.