diff options
author | Harry Mallon <harry@codexdigital.com> | 2016-12-03 19:31:41 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2016-12-03 19:39:05 (GMT) |
commit | a5a6f61be37bd7fa6997e40ed43b3450834b265e (patch) | |
tree | c6f84d71fbaa5c5197ca1ec3d0a1219eb936c412 /Modules/CPackRPM.cmake | |
parent | c45b767a8c2120ba61b9fafa31d8db37a919d62a (diff) | |
download | CMake-a5a6f61be37bd7fa6997e40ed43b3450834b265e.zip CMake-a5a6f61be37bd7fa6997e40ed43b3450834b265e.tar.gz CMake-a5a6f61be37bd7fa6997e40ed43b3450834b265e.tar.bz2 |
CPackRPM now supports multiple directives in CPACK_RPM_USER_FILELIST
* In older version "%dir %attr(-, root, root) foo" would put "%dir foo"
in the final spec file.
* Also added comment to describe this and advise not not to add trailing
slashes to directories in USER_FILELIST.
* Includes test in RunCMake CPack which now passes.
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 13 |
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}>") |