diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-05-10 18:33:08 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-13 10:46:04 -0400 |
commit | 3b648894366f86c94d4567811acb9549a81660ec (patch) | |
tree | ff362652d8d2075fe897ec69af2e9af134b13f51 | |
parent | 316dd6136721181c8b2e36b8d349d4fa15f7c4eb (diff) | |
download | cmake-3b648894366f86c94d4567811acb9549a81660ec.tar.gz |
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)
-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 dc3b4133cf..d93d924a87 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}") |