diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2017-09-21 05:53:42 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2017-09-21 17:54:17 (GMT) |
commit | 74b7457f12c943abd2c33aebc8ada5b50e331f50 (patch) | |
tree | 9ffa8bfd02811f78ed6b6efe8776c739a6d4afb2 /Modules/CPackRPM.cmake | |
parent | 821b54f4a6e1cebfc8d5c9b061c45683a4a5c6ba (diff) | |
download | CMake-74b7457f12c943abd2c33aebc8ada5b50e331f50.zip CMake-74b7457f12c943abd2c33aebc8ada5b50e331f50.tar.gz CMake-74b7457f12c943abd2c33aebc8ada5b50e331f50.tar.bz2 |
CPack RPM and DEB: improved package version handling
Adds support for epoch version to CPackRPM and
CPackDeb packagers.
Also adds better version checking to CPackDeb
that complies with Debian rules.
Fixes: #17057
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 3913494..6cbf25a 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -106,6 +106,16 @@ # group rpm package is generated without component suffix in filename and # package name. # +# .. variable:: CPACK_RPM_PACKAGE_EPOCH +# +# The RPM package epoch +# +# * Mandatory : No +# * Default : - +# +# Optional number that should be incremented when changing versioning schemas +# or fixing mistakes in the version numbers of older packages. +# # .. variable:: CPACK_RPM_PACKAGE_VERSION # # The RPM package version. @@ -1891,11 +1901,16 @@ function(cpack_rpm_generate_package) OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE "\n" ";" RPMBUILD_TAG_LIST "${RPMBUILD_TAG_LIST}") + if(CPACK_RPM_PACKAGE_EPOCH) + set(TMP_RPM_EPOCH "Epoch: ${CPACK_RPM_PACKAGE_EPOCH}") + endif() + # Check if additional fields for RPM spec header are given # There may be some COMPONENT specific variables as well # If component specific var is not provided we use the global one # for each component foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN) + if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}") endif() @@ -2501,6 +2516,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@TMP_RPM_AUTOREQPROV\@ \@TMP_RPM_BUILDARCH\@ \@TMP_RPM_PREFIXES\@ +\@TMP_RPM_EPOCH\@ %description -n \@CPACK_RPM_PACKAGE_NAME\@ \@CPACK_RPM_PACKAGE_DESCRIPTION\@ @@ -2560,6 +2576,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@TMP_RPM_AUTOREQPROV\@ \@TMP_RPM_BUILDARCH\@ \@TMP_RPM_PREFIXES\@ +\@TMP_RPM_EPOCH\@ \@TMP_RPM_DEBUGINFO\@ |