summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-07-06 14:30:30 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-07-06 14:30:30 (GMT)
commit48ac8180db56bc7988c2839b72bc134afdb10fb6 (patch)
tree9004b718e47b580b74873583189787ac83d54df0 /Modules/CPackRPM.cmake
parentbf3abc592e290e61d160661a715a97675b53fdea (diff)
parent6926e9114c832607bdad97827bb918cb21ab231d (diff)
downloadCMake-48ac8180db56bc7988c2839b72bc134afdb10fb6.zip
CMake-48ac8180db56bc7988c2839b72bc134afdb10fb6.tar.gz
CMake-48ac8180db56bc7988c2839b72bc134afdb10fb6.tar.bz2
Merge branch 'CPackRPM-handleFileWithSpace'
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index db5b87d..50fe510 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -430,12 +430,13 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l)
-# We must remove the './' due to the local search (thus the sed)
+# We must remove the './' due to the local search and escape the
+# file name by enclosing it between double quotes (thus the sed)
# Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files
EXECUTE_PROCESS(COMMAND find -type f -o -type l
- COMMAND sed {s/\\.//}
- COMMAND sed {s/.*man.*\\/.*/&*/}
+ COMMAND sed {s:.*/man.*/.*:&*:}
+ COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)