diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-05-10 16:31:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-13 14:46:04 (GMT) |
commit | 316dd6136721181c8b2e36b8d349d4fa15f7c4eb (patch) | |
tree | 65979df79b15ea0c1a3447c2b6cdaebf426ce746 /Modules/CPackDeb.cmake | |
parent | 271e03f089999d01860b6fcac35505f8a539884e (diff) | |
download | CMake-316dd6136721181c8b2e36b8d349d4fa15f7c4eb.zip CMake-316dd6136721181c8b2e36b8d349d4fa15f7c4eb.tar.gz CMake-316dd6136721181c8b2e36b8d349d4fa15f7c4eb.tar.bz2 |
CPack/Deb proper package file naming
Proper Debian packages file naming for single package
setup (breaks compatibility with previous versions)
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r-- | Modules/CPackDeb.cmake | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 227e1b1..dc3b413 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -835,15 +835,6 @@ function(cpack_deb_prepare_package_vars) endif() endif() - # Patch package file name to be in corrent form - if(CPACK_DEB_PACKAGE_COMPONENT) - set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") - set(CPACK_TEMPORARY_PACKAGE_FILE_NAME "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_OUTPUT_FILE_NAME}") - - get_filename_component(BINARY_DIR "${CPACK_OUTPUT_FILE_PATH}" DIRECTORY) - set(CPACK_OUTPUT_FILE_PATH "${BINARY_DIR}/${CPACK_OUTPUT_FILE_NAME}") - endif() - # add ldconfig call in default postrm and postint set(CPACK_ADD_LDCONFIG_CALL 0) foreach(_FILE ${CPACK_DEB_SHARED_OBJECT_FILES}) @@ -871,6 +862,14 @@ function(cpack_deb_prepare_package_vars) set(CPACK_DEBIAN_GENERATE_POSTRM 0) endif() + # Patch package file name to be in corrent debian format: + # <foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb + set(CPACK_OUTPUT_FILE_NAME + "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") + set(CPACK_TEMPORARY_PACKAGE_FILE_NAME "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_OUTPUT_FILE_NAME}") + get_filename_component(BINARY_DIR "${CPACK_OUTPUT_FILE_PATH}" DIRECTORY) + set(CPACK_OUTPUT_FILE_PATH "${BINARY_DIR}/${CPACK_OUTPUT_FILE_NAME}") + # Print out some debug information if we were asked for that if(CPACK_DEBIAN_PACKAGE_DEBUG) message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = '${CPACK_TOPLEVEL_DIRECTORY}'") |