Only try to install /var/lib/maxscale for core package

The only package that should even attempt to install the lib folder is the
main package.
This commit is contained in:
Markus Mäkelä
2017-01-10 16:11:28 +02:00
parent dffad71804
commit b39c47e4df

View File

@ -27,6 +27,9 @@ set(CPACK_RPM_USER_FILELIST "${IGNORED_DIRS}")
if(TARGET_COMPONENT STREQUAL "core") if(TARGET_COMPONENT STREQUAL "core")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postinst) set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postinst)
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postrm) set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postrm)
# Installing this prevents RPM from deleting the /var/lib/maxscale folder
install(DIRECTORY DESTINATION ${MAXSCALE_VARDIR}/lib/maxscale)
endif() endif()
if(EXTRA_PACKAGE_DEPENDENCIES) if(EXTRA_PACKAGE_DEPENDENCIES)
@ -34,5 +37,3 @@ if(EXTRA_PACKAGE_DEPENDENCIES)
endif() endif()
message(STATUS "Generating RPM packages") message(STATUS "Generating RPM packages")
# Installing this prevents RPM from deleting the /var/lib/maxscale folder
install(DIRECTORY DESTINATION ${MAXSCALE_VARDIR}/lib/maxscale COMPONENT core)