diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-05-10 16:33:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-13 14:46:04 (GMT) |
commit | 3b648894366f86c94d4567811acb9549a81660ec (patch) | |
tree | ff362652d8d2075fe897ec69af2e9af134b13f51 /Modules/CPackDeb.cmake | |
parent | 316dd6136721181c8b2e36b8d349d4fa15f7c4eb (diff) | |
download | CMake-3b648894366f86c94d4567811acb9549a81660ec.zip CMake-3b648894366f86c94d4567811acb9549a81660ec.tar.gz CMake-3b648894366f86c94d4567811acb9549a81660ec.tar.bz2 |
CPack/Deb package release number in file name
Debian packages file naming format must contain
revision number - package release number
(breaks compatibility with previous versions)
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r-- | Modules/CPackDeb.cmake | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index dc3b413..d93d924 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -50,6 +50,18 @@ # * Mandatory : YES # * Default : :variable:`CPACK_PACKAGE_VERSION` # +# .. variable:: CPACK_DEBIAN_PACKAGE_RELEASE +# +# The Debian package release - Debian revision number. +# +# * Mandatory : YES +# * Default : 1 +# +# This is the numbering of the DEB package itself, i.e. the version of the +# packaging and not the version of the content (see +# :variable:`CPACK_DEBIAN_PACKAGE_VERSION`). One may change the default value +# if the previous packaging was buggy and/or you want to put here a fancy Linux +# distro specific numbering. # # .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE # CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE @@ -862,10 +874,14 @@ function(cpack_deb_prepare_package_vars) set(CPACK_DEBIAN_GENERATE_POSTRM 0) endif() + if(NOT CPACK_DEBIAN_PACKAGE_RELEASE) + set(CPACK_DEBIAN_PACKAGE_RELEASE 1) + 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") + "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${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}") |