[CMake] [CPack] rpm and installing scripts and creating folders

Denis Samoilov samoilov at gmail.com
Wed Jul 30 21:00:28 EDT 2014


hi community,

i need to install init.d script along in my rpm. as I see in spec file
simple:

install(FILES ${CMAKE_SOURCE_DIR}/scripts/${PROJECT_NAME} DESTINATION
/etc/init.d PERMISSIONS
        OWNER_WRITE OWNER_READ OWNER_EXECUTE
        GROUP_READ GROUP_EXECUTE
        WORLD_READ WORLD_EXECUTE)

works fine.

but it adds %config for some unknown reason in spec:

%config "/etc/init.d/cacheproxyd"


I install my config file similar way:

install(FILES ${CMAKE_SOURCE_DIR}/conf/static.conf DESTINATION conf PERMISSIONS
        OWNER_WRITE OWNER_READ OWNER_EXECUTE
        GROUP_READ GROUP_EXECUTE
        WORLD_READ WORLD_EXECUTE)

but it results differently in spec:

%dir "/box/services/cacheproxyd/conf"

"/box/services/cacheproxyd/conf/static.conf"


why is this difference?


also, i want to precreate some folders, like

install(DIRECTORY DESTINATION "/var/run/cacheproxyd" DIRECTORY_PERMISSIONS
        OWNER_WRITE OWNER_READ
        GROUP_WRITE GROUP_READ
        WORLD_WRITE WORLD_READ WORLD_EXECUTE)

but it also for some unknown reason results as %config:

%config "/var/run/cacheproxyd/"

i would expect just:

%dir "/box/services/cacheproxyd"


my cmake is 2.8.12, CentOS


Any insight will be appreciated.


-denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140730/7a0eae47/attachment.html>


More information about the CMake mailing list