[Cmake-commits] CMake branch, next, updated. v2.8.2-221-gc8c3211
Eric Noulard
eric.noulard at gmail.com
Fri Jul 9 14:04:53 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, next has been updated
via c8c32115c92be0f84a070c7e9cae99b78a0e20cf (commit)
via 604c3698c1ba517b83b4e6142bf95f9562fed921 (commit)
from 35ab6eec9b4f451df9250641ad53be8c6dee1340 (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=c8c32115c92be0f84a070c7e9cae99b78a0e20cf
commit c8c32115c92be0f84a070c7e9cae99b78a0e20cf
Merge: 35ab6ee 604c369
Author: Eric NOULARD <eric.noulard at gmail.com>
AuthorDate: Fri Jul 9 20:04:38 2010 +0200
Commit: Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Fri Jul 9 20:04:38 2010 +0200
Merge branch 'CPackRPM-RelocatablePackage' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=604c3698c1ba517b83b4e6142bf95f9562fed921
commit 604c3698c1ba517b83b4e6142bf95f9562fed921
Author: Eric NOULARD <eric.noulard at gmail.com>
AuthorDate: Fri Jul 9 20:01:57 2010 +0200
Commit: Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Fri Jul 9 20:01:57 2010 +0200
CPackRPM:: [partially] support relocatable package
The support is partial because it cannot be used if
CPACK_SET_DESTDIR is set
some file are installed using absolute path
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 50fe510..7ab1181 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -81,6 +81,18 @@
# Mandatory : NO
# Default : -
# May be used to set RPM packages that are obsoleted by this one.
+# CPACK_RPM_PACKAGE_RELOCATABLE
+# Mandatory : NO
+# Default : -
+# If this variable is set to TRUE or ON CPackRPM will try
+# to build a relocatable RPM package. A relocatable RPM may
+# be installed using rpm --prefix or --relocate in order to
+# install it at an alternate place see rpm(8).
+# Note that currently this may fail if the package contains
+# files installed with absolute path or CPACK_SET_DESTDIR is set to ON.
+# If CPACK_SET_DESTDIR is set then you will get a warning message
+# but if there is file installed with absolute path you'll get
+# unexpected behavior.
# CPACK_RPM_SPEC_INSTALL_POST
# Mandatory : NO
# Default : -
@@ -319,8 +331,19 @@ ELSE(CPACK_RPM_COMPRESSION_TYPE)
SET(CPACK_RPM_COMPRESSION_TYPE_TMP "")
ENDIF(CPACK_RPM_COMPRESSION_TYPE)
+if(CPACK_RPM_PACKAGE_RELOCATABLE)
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: Trying to build a relocatable package")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_SET_DESTDIR)
+ message(SEND_ERROR "CPackRPM:Warning: CPACK_SET_DESTDIR is set while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.")
+ else(CPACK_SET_DESTDIR)
+ set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX})
+ endif(CPACK_SET_DESTDIR)
+endif(CPACK_RPM_PACKAGE_RELOCATABLE)
+
# check if additional fields for RPM spec header are given
-FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES)
+FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX)
IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER})
STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
@@ -477,8 +500,8 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
\@TMP_RPM_PROVIDES\@
\@TMP_RPM_OBSOLETES\@
\@TMP_RPM_BUILDARCH\@
+\@TMP_RPM_PREFIX\@
-#p define prefix \@CMAKE_INSTALL_PREFIX\@
%define _rpmdir \@CPACK_RPM_DIRECTORY\@
%define _rpmfilename \@CPACK_RPM_FILE_NAME\@
%define _unpackaged_files_terminate_build 0
-----------------------------------------------------------------------
Summary of changes:
Modules/CPackRPM.cmake | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list