summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-09-07 19:38:50 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-09-07 19:38:50 (GMT)
commitc80cbad15226844c2c518e49656fe19fc52d8d33 (patch)
tree6637b5a307a0af8df4dc9bf38ac07673d2e9d569 /Modules/CPackRPM.cmake
parent05bc6bfb87a9afe9c85bd90406fce348a92b7807 (diff)
parentf9e527794159844963f6bd67b5627026a0f552a6 (diff)
downloadCMake-c80cbad15226844c2c518e49656fe19fc52d8d33.zip
CMake-c80cbad15226844c2c518e49656fe19fc52d8d33.tar.gz
CMake-c80cbad15226844c2c518e49656fe19fc52d8d33.tar.bz2
Merge topic 'CPackRPM-includeDir'
f9e5277 CPackRPM fix #12305, include directories in RPM package
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 5826542..fa4bb05 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -491,11 +491,13 @@ ELSE(CPACK_RPM_PACKAGE_COMPONENT)
ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# 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)
+# but not the main local dir "." (thus -a -not -name ".")
# 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
+EXECUTE_PROCESS(COMMAND find . -type f -o -type l -o (-type d -a -not -name ".")
COMMAND sed s:.*/man.*/.*:&*:
COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
WORKING_DIRECTORY "${WDIR}"