summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorEric Noulard <eric.noulard@gmail.com>2009-11-09 19:06:36 (GMT)
committerEric Noulard <eric.noulard@gmail.com>2009-11-09 19:06:36 (GMT)
commit2362fdc850805aebdf50312ea7946c0c69dedae5 (patch)
tree9b1ee6869fa40c7e704ef83887799caa2fff9785 /Modules/CPackRPM.cmake
parent665ac8d4a49630ff632141ecd5fb32584d551a43 (diff)
downloadCMake-2362fdc850805aebdf50312ea7946c0c69dedae5.zip
CMake-2362fdc850805aebdf50312ea7946c0c69dedae5.tar.gz
CMake-2362fdc850805aebdf50312ea7946c0c69dedae5.tar.bz2
Fix CPack bug #9654
Eric
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index fe30058..5167fa7 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -277,8 +277,13 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
# neither escaping (as below) nor putting quotes around the path seem to help
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
-
+# Use files tree to construct files command (spec file)
+EXECUTE_PROCESS(COMMAND find -type f
+ COMMAND sed {s/\\.//}
+ WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
+ OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
+
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
IF(CPACK_RPM_USER_BINARY_SPECFILE)
# User may have specified SPECFILE just use it
@@ -326,6 +331,8 @@ ${CPACK_RPM_PACKAGE_DESCRIPTION}
# generated by CMake RPM generator
# we skip the _prepn _build and _install
# steps because CPack does that for us
+# WE MUST NOT DO ANYTHING in those steps because they
+# may fail for non-privileged user
#p prep
#p build
@@ -338,9 +345,11 @@ ${CPACK_RPM_PACKAGE_DESCRIPTION}
%defattr(-,root,root,-)
#p dir %{prefix}
#p {prefix}/*
-/*
+${CPACK_RPM_INSTALL_FILES}
%changelog
+* Sat Oct 03 2009 Kami <cmoidavid@gmail.com>
+ Update to handle more precisely the files section
* Mon Oct 03 2008 Erk <eric.noulard@gmail.com>
Update generator to handle optional dependencies using Requires
Update DEBUG output typos.