Hi,

I'm currently trying to solve a two problems with the RPM generator:
 * Lack of support for file names containing spaces
 * Lack of support for %config and %config(noreplace)

I'm yet to succeed. I tried to fix the call to sed to enclose file names between double quotes. It's not working as expected. I suspect I might have missed a backslash somewhere.

As for the %config support, it works well as long as I specify only one file. I believe I would need to add a %config line for each file. Unfortunately don't know how to achieve this with CMake macros.

Any help is of course welcome. Here are my changes:

--- ./CPackRPM.cmake.orig       2010-05-06 19:52:00.000000000 +0200
+++ ./CPackRPM.cmake    2010-05-06 19:16:15.000000000 +0200
@@ -410,8 +410,8 @@
 # We must remove the './' due to the local search (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/\\.//}
+EXECUTE_PROCESS(COMMAND find . -type f -o -type l
+               COMMAND sed {s/^\\.\\(.*\\)\$/\"\\1\"/}
                COMMAND sed {s/.*man.*\\/.*/&*/}
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
                OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
@@ -498,8 +498,8 @@
 %files
 %defattr(-,root,root,-)
 \...@tmp_rpm_spec_config\@
-...@tmp_rpm_spec_config_rename\@
-${CPACK_RPM_INSTALL_FILES}
+...@tmp_rpm_spec_config_noreplace\@
+...@cpack_rpm_install_files\@

 %changelog
 * Sat Nov 28 2009 Erk <[email protected]>

--
Erwan Legrand
Sr. Software Engineer
Gateway Technology
Cloudmark
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to