summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-05 14:23:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-05 14:23:26 (GMT)
commit76444957c1978deea8d15b906e733d5e1e33e7db (patch)
treeb35f83ef1d2c16ec2b83a39ea90e61242ffe9eff /Modules
parentf6f42b25c841d807536ec533a5a738d7dd6f02dd (diff)
parent4e4b786e33cb67250a026efc1bbba6bba8575a07 (diff)
downloadCMake-76444957c1978deea8d15b906e733d5e1e33e7db.zip
CMake-76444957c1978deea8d15b906e733d5e1e33e7db.tar.gz
CMake-76444957c1978deea8d15b906e733d5e1e33e7db.tar.bz2
Merge topic 'cpack-rpm-user-file-list-with-multiple-directives'
4e4b786e CPack/RPM CPACK_RPM_USER_FILELIST change release note a5a6f61b CPackRPM now supports multiple directives in CPACK_RPM_USER_FILELIST
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackRPM.cmake13
1 files changed, 8 insertions, 5 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 39697f0..5021c41 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -507,10 +507,12 @@
#
# May be used to explicitly specify ``%(<directive>)`` file line
# in the spec file. Like ``%config(noreplace)`` or any other directive
-# that be found in the ``%files`` section. Since CPackRPM is generating
-# the list of files (and directories) the user specified files of
-# the ``CPACK_RPM_<COMPONENT>_USER_FILELIST`` list will be removed from
-# the generated list.
+# that be found in the ``%files`` section. You can have multiple directives
+# per line, as in ``%attr(600,root,root) %config(noreplace)``. Since
+# CPackRPM is generating the list of files (and directories) the user
+# specified files of the ``CPACK_RPM_<COMPONENT>_USER_FILELIST`` list will
+# be removed from the generated list. If referring to directories do
+# not add a trailing slash.
#
# .. variable:: CPACK_RPM_CHANGELOG_FILE
#
@@ -2055,7 +2057,8 @@ function(cpack_rpm_generate_package)
set(CPACK_RPM_USER_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL)
string(REGEX REPLACE "%[A-Za-z]+(\\([^()]*\\))? " "" F_PATH ${F})
- string(REGEX MATCH "%[A-Za-z]+(\\([^()]*\\))?" F_PREFIX ${F})
+ string(REGEX MATCH "(%[A-Za-z]+(\\([^()]*\\))? )*" F_PREFIX ${F})
+ string(STRIP ${F_PREFIX} F_PREFIX)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: F_PREFIX=<${F_PREFIX}>, F_PATH=<${F_PATH}>")