I'm not exactly sure what you are asking, but I think that rpm takes care of moving old files by renaming them to .rpmorig. As an alternative it is possible to pass your own rpm spec file to cmakerpm and there you can use pre- and postinstallation hooks to do what you want.

Micha

On 07/10/2012 06:48 AM, jupiter wrote:
Hi,

I need to run shell script to do following check and to install
configure files during RPM installation:

if config files installed in /etc/myconfig, rename files in
/etc/myconfig and copy new config files to /etc/myconfig;
else copy config files to /etc/myconfig

Is there a simple way to do it? I am not clear if the install(SCRIPT
...) can be used, I guess the cmake script can be invoked during
installation to call execute_process() for bash shell commands, but
where I can copy my configuration source files from?

Thank you.

Kind regards,

Jupiter
--

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


--

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