Add component specific package descriptions

The package descriptions, summaries and licenses now use a generic
mechanism. This makes it easier to add new components that only include
small parts or use a different license.

Also updated the descriptions, the license versions and package summaries
for the main packages.
This commit is contained in:
Markus Mäkelä 2018-02-12 10:32:31 +02:00
parent f252f25624
commit eab4ec1768
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
5 changed files with 53 additions and 32 deletions

View File

@ -93,11 +93,6 @@ endif()
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR})
# Only do packaging if configured
if(PACKAGE)
include(cmake/package.cmake)
endif()
# Make sure the release notes for this release are present if it is a stable one
if(${MAXSCALE_VERSION} MATCHES "-stable")
file(GLOB ${CMAKE_SOURCE_DIR}/Documentation/Release-Notes RELEASE_NOTES *${MAXSCALE_VERSION_NUMERIC}*.md)
@ -238,6 +233,8 @@ if(WITH_SCRIPTS)
endif()
if(PACKAGE)
# Configure packaging
include(cmake/package.cmake)
# Install the files copied by the postinst script into the share folder
install_program(${CMAKE_BINARY_DIR}/maxscale core)
@ -245,7 +242,8 @@ if(PACKAGE)
install_program(${CMAKE_BINARY_DIR}/postinst core)
install_program(${CMAKE_BINARY_DIR}/postrm core)
# CPack needs to be included after everything is configured
# The inclusion of CPack needs to be the last effective packaging related command. All
# configurations to packaging done after the call will be ignored.
include(CPack)
endif()
@ -302,11 +300,6 @@ add_custom_target(generate_html
-P generate-html.cmake
COMMENT "Generating HTML files" VERBATIM)
if(PACKAGE)
message(STATUS "You can install startup scripts and system configuration files for MaxScale by running the 'postinst' shell script located at ${CMAKE_INSTALL_PREFIX}.")
message(STATUS "To remove these installed files, run the 'postrm' shell script located in the same folder.")
endif()
# NOTE: If you make changes here, ensure they are compatible with the
# situation in paths.h.in.
if (NOT PACKAGE)

View File

@ -19,22 +19,49 @@ endif()
set(CPACK_SET_DESTDIR ON)
set(CPACK_PACKAGE_RELOCATABLE FALSE)
set(CPACK_STRIP_FILES FALSE)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MaxScale - The Dynamic Data Routing Platform")
set(CPACK_PACKAGE_VERSION_MAJOR "${MAXSCALE_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${MAXSCALE_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${MAXSCALE_VERSION_PATCH}")
set(CPACK_PACKAGE_CONTACT "MariaDB Corporation Ab")
set(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/etc/DESCRIPTION)
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.")
# Descriptions for the main packages
set(core_PACKAGE_SUMMARY "MaxScale - An intelligent database proxy")
set(core_PACKAGE_DESCRIPTION "
The MariaDB Corporation MaxScale is an intelligent proxy that allows forwarding of
database statements to one or more database servers using complex rules,
a semantic understanding of the database statements and the roles of
the various servers within the backend cluster of databases.
MaxScale is designed to provide load balancing and high availability
functionality transparently to the applications. In addition it provides
a highly scalable and flexible architecture, with plugin components to
support different protocols and routing decisions.")
set(devel_PACKAGE_SUMMARY "MaxScale plugin development headers")
set(devel_PACKAGE_DESCRIPTION "
This package contains header files required for plugin module development for
MariaDB MaxScale. The source of MariaDB MaxScale is not required.")
set(experimental_PACKAGE_SUMMARY "MaxScale experimental modules")
set(experimental_PACKAGE_DESCRIPTION "
This package contains experimental and community contributed modules for MariaDB
MaxScale. The packages are not fully supported parts of MaxScale and should be
considered as alpha quality software.")
set(all_PACKAGE_SUMMARY ${core_PACKAGE_SUMMARY})
set(all_PACKAGE_DESCRIPTION ${core_PACKAGE_DESCRIPTION})
# Set the package description for this component
if (${TARGET_COMPONENT}_PACKAGE_DESCRIPTION AND ${TARGET_COMPONENT}_PACKAGE_SUMMARY)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${${TARGET_COMPONENT}_PACKAGE_SUMMARY})
set(CPACK_PACKAGE_DESCRIPTION ${${TARGET_COMPONENT}_PACKAGE_DESCRIPTION})
set(DESCRIPTION_TEXT ${${TARGET_COMPONENT}_PACKAGE_DESCRIPTION})
elseif((${TARGET_COMPONENT}_PACKAGE_DESCRIPTION OR ${TARGET_COMPONENT}_PACKAGE_SUMMARY))
message(FATAL_ERROR "Component '${TARGET_COMPONENT}' does not define both "
"${TARGET_COMPONENT}_PACKAGE_DESCRIPTION and ${TARGET_COMPONENT}_PACKAGE_SUMMARY variables.")
endif()
# If we're building something other than the main package, append the target name

View File

@ -3,11 +3,18 @@
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
set(CPACK_RPM_PACKAGE_RELEASE ${MAXSCALE_BUILD_NUMBER})
set(CPACK_RPM_PACKAGE_VENDOR "MariaDB Corporation Ab")
set(CPACK_RPM_PACKAGE_LICENSE "MariaDB BSL")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/etc /etc/ld.so.conf.d /etc/init.d /etc/rc.d/init.d /usr/share/man /usr/share/man1")
set(CPACK_RPM_SPEC_MORE_DEFINE "%define ignore \#")
set(CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_RPM_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
# If the package defines an explicit license, use that. Otherwise, use BSL 1.1
if (${TARGET_COMPONENT}_LICENSE)
set(CPACK_RPM_PACKAGE_LICENSE ${TARGET_COMPONENT}_LICENSE)
else()
set(CPACK_RPM_PACKAGE_LICENSE "MariaDB BSL 1.1")
endif()
set(IGNORED_DIRS
"%ignore /etc"
@ -30,8 +37,6 @@ if(TARGET_COMPONENT STREQUAL "core")
# Installing this prevents RPM from deleting the /var/lib/maxscale folder
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()
if(EXTRA_PACKAGE_DEPENDENCIES)

View File

@ -10,3 +10,8 @@ set_target_properties(cdc_connector_static PROPERTIES OUTPUT_NAME cdc_connector)
install_dev_library(cdc_connector cdc-connector)
install_dev_library(cdc_connector_static cdc-connector)
install_header(cdc_connector.h cdc-connector)
install_file(LICENSE cdc-connector)
set(cdc-connector_PACKAGE_SUMMARY "MaxScale CDC Connector" CACHE INTERNAL "")
set(cdc-connector_PACKAGE_DESCRIPTION "The C++ connector for the MariaDB MaxScale CDC system." CACHE INTERNAL "")
set(cdc-connector_LICENSE "LGPLv2.1" CACHE INTERNAL "")

View File

@ -1,9 +0,0 @@
The MariaDB Corporation MaxScale is an intelligent proxy that allows forwarding of
database statements to one or more database servers using complex rules,
a semantic understanding of the database statements and the roles of
the various servers within the backend cluster of databases.
MaxScale is designed to provide load balancing and high availability
functionality transparently to the applications. In addition it provides
a highly scalable and flexible architecture, with plugin components to
support different protocols and routing decisions.