Add files to devel package
The devel package was missing the protocol/mysql.h-file. Also, added copyright and licence files and a devel-specific description. The package target is now checked to be one of the recognized ones.
This commit is contained in:
@ -224,6 +224,9 @@ install_file(etc/lsyncd_example.conf core)
|
|||||||
install_manual(Documentation/maxscale.1 1 core)
|
install_manual(Documentation/maxscale.1 1 core)
|
||||||
install_file(${CMAKE_SOURCE_DIR}/server/maxscale_binlogserver_template.cnf core)
|
install_file(${CMAKE_SOURCE_DIR}/server/maxscale_binlogserver_template.cnf core)
|
||||||
|
|
||||||
|
# For devel package, these files are put to the base folder
|
||||||
|
install_header(${CMAKE_SOURCE_DIR}/COPYRIGHT devel)
|
||||||
|
install_header(${CMAKE_SOURCE_DIR}/LICENSE.TXT devel)
|
||||||
|
|
||||||
# Install startup scripts and ldconfig files
|
# Install startup scripts and ldconfig files
|
||||||
if(WITH_SCRIPTS)
|
if(WITH_SCRIPTS)
|
||||||
|
@ -2,11 +2,24 @@
|
|||||||
|
|
||||||
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
|
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
|
||||||
|
|
||||||
|
# Check target
|
||||||
|
set(PACK_TARGETS "core" "devel" "external" "all")
|
||||||
|
if(DEFINED TARGET_COMPONENT AND NOT TARGET_COMPONENT STREQUAL "")
|
||||||
|
set(LIST_INDEX -1)
|
||||||
|
list(FIND PACK_TARGETS ${TARGET_COMPONENT} LIST_INDEX)
|
||||||
|
if (${LIST_INDEX} EQUAL -1)
|
||||||
|
message(FATAL_ERROR "Unrecognized TARGET_COMPONENT value. Allowed values: ${PACK_TARGETS}.")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(TARGET_COMPONENT "core")
|
||||||
|
message(STATUS "No TARGET_COMPONENT defined, using default value 'core'")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Generic CPack configuration variables
|
# Generic CPack configuration variables
|
||||||
set(CPACK_SET_DESTDIR ON)
|
set(CPACK_SET_DESTDIR ON)
|
||||||
set(CPACK_PACKAGE_RELOCATABLE FALSE)
|
set(CPACK_PACKAGE_RELOCATABLE FALSE)
|
||||||
set(CPACK_STRIP_FILES FALSE)
|
set(CPACK_STRIP_FILES FALSE)
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MaxScale")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MaxScale - The Dynamic Data Routing Platform")
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR "${MAXSCALE_VERSION_MAJOR}")
|
set(CPACK_PACKAGE_VERSION_MAJOR "${MAXSCALE_VERSION_MAJOR}")
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR "${MAXSCALE_VERSION_MINOR}")
|
set(CPACK_PACKAGE_VERSION_MINOR "${MAXSCALE_VERSION_MINOR}")
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH "${MAXSCALE_VERSION_PATCH}")
|
set(CPACK_PACKAGE_VERSION_PATCH "${MAXSCALE_VERSION_PATCH}")
|
||||||
@ -15,6 +28,15 @@ set(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab")
|
|||||||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/etc/DESCRIPTION)
|
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/etc/DESCRIPTION)
|
||||||
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
# If building devel package, change the description. Deb- and rpm-specific parameters are set in their
|
||||||
|
# dedicated files "package_(deb/rpm).cmake"
|
||||||
|
if (TARGET_COMPONENT STREQUAL "devel")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MaxScale plugin development headers")
|
||||||
|
set(DESCRIPTION_TEXT "\
|
||||||
|
This package contains header files required for plugin module development for MariaDB MaxScale. \
|
||||||
|
The source of MariaDB MaxScale is not required.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# If we're building something other than the main package, append the target name
|
# If we're building something other than the main package, append the target name
|
||||||
# to the package name.
|
# to the package name.
|
||||||
if(DEFINED TARGET_COMPONENT AND NOT TARGET_COMPONENT STREQUAL "core" AND NOT TARGET_COMPONENT STREQUAL "")
|
if(DEFINED TARGET_COMPONENT AND NOT TARGET_COMPONENT STREQUAL "core" AND NOT TARGET_COMPONENT STREQUAL "")
|
||||||
|
@ -7,6 +7,8 @@ set(CPACK_DEBIAN_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
|||||||
if(TARGET_COMPONENT STREQUAL "core")
|
if(TARGET_COMPONENT STREQUAL "core")
|
||||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/postinst;${CMAKE_BINARY_DIR}/postrm")
|
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/postinst;${CMAKE_BINARY_DIR}/postrm")
|
||||||
|
elseif(TARGET_COMPONENT STREQUAL "devel")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n${DESCRIPTION_TEXT}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXTRA_PACKAGE_DEPENDENCIES)
|
if(EXTRA_PACKAGE_DEPENDENCIES)
|
||||||
|
@ -30,6 +30,8 @@ if(TARGET_COMPONENT STREQUAL "core")
|
|||||||
|
|
||||||
# Installing this prevents RPM from deleting the /var/lib/maxscale folder
|
# Installing this prevents RPM from deleting the /var/lib/maxscale folder
|
||||||
install(DIRECTORY DESTINATION ${MAXSCALE_VARDIR}/lib/maxscale)
|
install(DIRECTORY DESTINATION ${MAXSCALE_VARDIR}/lib/maxscale)
|
||||||
|
elseif(TARGET_COMPONENT STREQUAL "devel")
|
||||||
|
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n${DESCRIPTION_TEXT}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXTRA_PACKAGE_DEPENDENCIES)
|
if(EXTRA_PACKAGE_DEPENDENCIES)
|
||||||
|
@ -23,3 +23,5 @@ file(GLOB GENERATD_HEADERS "${CMAKE_BINARY_DIR}/include/maxscale/*.hh")
|
|||||||
foreach(var ${GENERATD_HEADERS})
|
foreach(var ${GENERATD_HEADERS})
|
||||||
install_header(${var} devel)
|
install_header(${var} devel)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
add_subdirectory(protocol)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
file(GLOB HEADERS "*.h*")
|
file(GLOB HEADERS "*.h*")
|
||||||
foreach(var ${HEADERS})
|
foreach(var ${HEADERS})
|
||||||
get_filename_component(header ${var} NAME)
|
get_filename_component(header ${var} NAME)
|
||||||
install_header(${header} devel)
|
install_custom_file(${header} ${CMAKE_INSTALL_INCLUDEDIR}/maxscale/protocol devel)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Reference in New Issue
Block a user