summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Greene <russell@churchillnavigation.com>2021-07-26 18:36:04 (GMT)
committerRussell Greene <russell@churchillnavigation.com>2021-07-29 17:40:40 (GMT)
commit051da997da6344a33145e7c370e336dfc1e8fb09 (patch)
treef2f052121aa3d80952ab33a4c0e37610a0f73d1e
parent6c01bbe180df8771fa1e93776f0b716ac146218f (diff)
downloadCMake-051da997da6344a33145e7c370e336dfc1e8fb09.zip
CMake-051da997da6344a33145e7c370e336dfc1e8fb09.tar.gz
CMake-051da997da6344a33145e7c370e336dfc1e8fb09.tar.bz2
CPack/DEB: Add zstd compression for deb packages
-rw-r--r--Help/cpack_gen/deb.rst21
-rw-r--r--Help/release/dev/cpack-deb-add-zstd-compression.rst6
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx3
3 files changed, 26 insertions, 4 deletions
diff --git a/Help/cpack_gen/deb.rst b/Help/cpack_gen/deb.rst
index d8d53ec..3b341c2 100644
--- a/Help/cpack_gen/deb.rst
+++ b/Help/cpack_gen/deb.rst
@@ -274,10 +274,23 @@ List of CPack DEB generator specific variables:
Possible values are:
- - lzma
- - xz
- - bzip2
- - gzip
+ ``lzma``
+ Lempel–Ziv–Markov chain algorithm
+
+ ``xz``
+ XZ Utils compression
+
+ ``bzip2``
+ bzip2 Burrows–Wheeler algorithm
+
+ ``gzip``
+ GNU Gzip compression
+
+ ``zstd``
+ .. versionadded:: 3.22
+
+ Zstandard compression
+
.. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY
diff --git a/Help/release/dev/cpack-deb-add-zstd-compression.rst b/Help/release/dev/cpack-deb-add-zstd-compression.rst
new file mode 100644
index 0000000..a138455
--- /dev/null
+++ b/Help/release/dev/cpack-deb-add-zstd-compression.rst
@@ -0,0 +1,6 @@
+cpack-deb-add-zstd-compression
+------------------------------
+
+* The :cpack_gen:`CPack DEB Generator` gained the
+ option to set :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` to zstd,
+ which enables Zstandard compression for deb packages.
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 5b03185..5f0f153 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -111,6 +111,9 @@ DebGenerator::DebGenerator(
} else if (!std::strcmp(debianCompressionType, "gzip")) {
this->CompressionSuffix = ".gz";
this->TarCompressionType = cmArchiveWrite::CompressGZip;
+ } else if (!std::strcmp(debianCompressionType, "zstd")) {
+ this->CompressionSuffix = ".zst";
+ this->TarCompressionType = cmArchiveWrite::CompressZstd;
} else if (!std::strcmp(debianCompressionType, "none")) {
this->CompressionSuffix.clear();
this->TarCompressionType = cmArchiveWrite::CompressNone;