[Cmake-commits] CMake branch, master, updated. fcdbe001ea87462997b96024ee8c166884257883

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Apr 10 05:24:19 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  fcdbe001ea87462997b96024ee8c166884257883 (commit)
      from  c55814170e773719c9bc6c8dce05757b6a789999 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcdbe001ea87462997b96024ee8c166884257883
commit fcdbe001ea87462997b96024ee8c166884257883
Author: Eric NOULARD <eric.noulard at gmail.com>
Date:   Sat Apr 10 11:23:01 2010 +0200

    CPackRPM:: Fix bug #10363, specify compression type in RPM spec
    
    This is a feature request
    --Eric

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 29a1218..3bf8e0e 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -49,6 +49,14 @@
 #  CPACK_RPM_PACKAGE_DESCRIPTION
 #     Mandatory : YES
 #     Default   : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
+#  CPACK_RPM_COMPRESSION_TYPE
+#     Mandatory : NO
+#     Default   : -
+#     May be used to override RPM compression type to be used
+#     to build the RPM. For example some Linux distribution now default
+#     to lzma or xz compression whereas older cannot use such RPM.
+#     Using this one can enforce compression type to be used.
+#     Possible value are: lzma, xz, bzip2 and gzip.
 #  CPACK_RPM_PACKAGE_REQUIRES
 #     Mandatory : NO
 #     Default   : -
@@ -265,6 +273,27 @@ IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
         ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE)
 ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
 
+# CPACK_RPM_COMPRESSION_TYPE
+#
+IF (CPACK_RPM_COMPRESSION_TYPE)
+   IF(CPACK_RPM_PACKAGE_DEBUG)
+     MESSAGE("CPackRPM:Debug: User Specified RPM compression type: ${CPACK_RPM_COMPRESSION_TYPE}")
+   ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+   IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
+     SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.lzdio")
+   ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
+   IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
+     SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7.xzdio")
+   ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
+   IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
+     SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.bzdio")
+   ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
+   IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
+     SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.gzdio")
+   ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
+ELSE(CPACK_RPM_COMPRESSION_TYPE)
+   SET(CPACK_RPM_COMPRESSION_TYPE_TMP "")
+ENDIF(CPACK_RPM_COMPRESSION_TYPE)
 # CPACK_RPM_PACKAGE_REQUIRES
 # Placeholder used to specify binary RPM dependencies (if any)
 # see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
@@ -419,6 +448,7 @@ Vendor:         \@CPACK_RPM_PACKAGE_VENDOR\@
 %define _topdir \@CPACK_RPM_DIRECTORY\@
 \@TMP_RPM_SPEC_INSTALL_POST\@
 \@CPACK_RPM_SPEC_MORE_DEFINE\@
+\@CPACK_RPM_COMPRESSION_TYPE_TMP\@
   
 %description
 \@CPACK_RPM_PACKAGE_DESCRIPTION\@
@@ -459,6 +489,8 @@ fi
 ${CPACK_RPM_INSTALL_FILES}
 
 %changelog
+* Sun Apr 4 2010 Erk <eric.noulard at gmail.com>
+  Add support for specifying RPM compression type
 * Sat Nov 28 2009 Erk <eric.noulard at gmail.com>
   Refix backup/restore install tree for OpenSuSE 11.2
 * Sun Nov 22 2009 Erk <eric.noulard at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 Modules/CPackRPM.cmake |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list