Merge topic 'CPackRPM_handleAttrDirectiveProperly-reloaded'

d8a1dd5 Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
This commit is contained in:
Brad King 2012-09-11 15:01:52 -04:00 committed by CMake Topic Stage
commit ba72828edd
1 changed files with 10 additions and 4 deletions

View File

@ -728,18 +728,24 @@ if(CPACK_RPM_USER_FILELIST_INTERNAL)
set(CPACK_RPM_USER_INSTALL_FILES "") set(CPACK_RPM_USER_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL) foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL)
string(REGEX REPLACE "%[A-Za-z\(\)]* " "" F_PATH ${F}) string(REGEX REPLACE "%[A-Za-z0-9\(\),-]* " "" F_PATH ${F})
string(REGEX MATCH "%[A-Za-z\(\)]*" F_PREFIX ${F}) string(REGEX MATCH "%[A-Za-z0-9\(\),-]*" F_PREFIX ${F})
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: F_PREFIX=<${F_PREFIX}>, F_PATH=<${F_PATH}>")
endif()
if(F_PREFIX) if(F_PREFIX)
set(F_PREFIX "${F_PREFIX} ") set(F_PREFIX "${F_PREFIX} ")
endif() endif()
# Rebuild the user list file # Rebuild the user list file
set(CPACK_RPM_USER_INSTALL_FILES "${CPACK_RPM_USER_INSTALL_FILES}${F_PREFIX}\"${F_PATH}\"\n") set(CPACK_RPM_USER_INSTALL_FILES "${CPACK_RPM_USER_INSTALL_FILES}${F_PREFIX}\"${F_PATH}\"\n")
# Remove from CPACK_RPM_INSTALL_FILES and CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL # Remove from CPACK_RPM_INSTALL_FILES and CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL
list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${F_PATH}) list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${F_PATH})
list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH}) # ABSOLUTE destination files list may not exists at all
if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH})
endif()
endforeach() endforeach()