summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-05-16 18:36:00 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-05-16 18:36:00 (GMT)
commit7e7b7fe4b320fedb838485a6bfcfb582cccf0fcc (patch)
tree6278dea69b45a70edbf5620cbaefb7864b7635e6 /Modules/CPackRPM.cmake
parente3925203090b8a21bc6cc4ce6446650261bc1552 (diff)
parentf055c997a5ee186eb2f264cf4425148745ba6514 (diff)
downloadCMake-7e7b7fe4b320fedb838485a6bfcfb582cccf0fcc.zip
CMake-7e7b7fe4b320fedb838485a6bfcfb582cccf0fcc.tar.gz
CMake-7e7b7fe4b320fedb838485a6bfcfb582cccf0fcc.tar.bz2
Merge topic 'CPackRPM-avoidOwningSystemDirs'
f055c99 CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path bac5772 CPackRPM add mechanism to remove path from generated list of file in RPM spec.
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake42
1 files changed, 42 insertions, 0 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 024822e..52fdc91 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -225,6 +225,24 @@
# The refered file will be read and directly put after the %changelog
# section.
##end
+##variable
+# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST - list of path to be excluded.
+# Mandatory : NO
+# Default : /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include
+# May be used to exclude path (directories or files) from the auto-generated
+# list of paths discovered by CPack RPM. The defaut value contains a reasonable
+# set of values if the variable is not defined by the user. If the variable
+# is defined by the user then CPackRPM will NOT any of the default path.
+# If you want to add some path to the default list then you can use
+# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable.
+##end
+##variable
+# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - additional list of path to be excluded.
+# Mandatory : NO
+# Default : -
+# May be used to add more exclude path (directories or files) from the initial
+# default list of excluded paths. See CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.
+##end
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
@@ -668,6 +686,30 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE)
endforeach()
endif()
+if (CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: Initial list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}")
+endif()
+
+if (NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
+ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include)
+ if (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION)
+ message("CPackRPM:Debug: Adding ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.")
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}")
+ endif()
+endif()
+
+if(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
+ if (CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST= ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST}")
+ endif()
+ foreach(_DIR ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST})
+ list(APPEND _RPM_DIRS_TO_OMIT "-o;-path;.${_DIR}")
+ endforeach()
+endif()
+if (CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: Final list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}")
+endif()
+
# Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l)
# We should include directory as well (thus -type d)