summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2011-09-05 20:15:31 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2011-09-05 20:15:31 (GMT)
commitf9e527794159844963f6bd67b5627026a0f552a6 (patch)
tree8e8bf8a8646fe19917530051dfdda4283df061d6 /Modules/CPackRPM.cmake
parent48ba9b2f197cde7f309b9ef3770e1bf003a7e8e8 (diff)
downloadCMake-f9e527794159844963f6bd67b5627026a0f552a6.zip
CMake-f9e527794159844963f6bd67b5627026a0f552a6.tar.gz
CMake-f9e527794159844963f6bd67b5627026a0f552a6.tar.bz2
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 729d8df..fa0bc72 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}"