mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'cpack-deb-config-file-source-field'
e5b70ed0CPackDEB: added config file optional Source fieldf2d98e2dCPackDEB: minor documentation and debug logging fixes
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# CPackDeb may be used to create Deb package using CPack.
|
||||
# CPackDeb is a CPack generator thus it uses the CPACK_XXX variables
|
||||
# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
|
||||
# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
|
||||
# CPackDeb generator should work on any linux host but it will produce
|
||||
# better deb package when Debian specific tools 'dpkg-xxx' are usable on
|
||||
@@ -18,7 +18,7 @@
|
||||
# :code:`CPACK_DEBIAN_XXX` variables.
|
||||
#
|
||||
# :code:`CPACK_DEBIAN_<COMPONENT>_XXXX` variables may be used in order to have
|
||||
# **component** specific values. Note however that <COMPONENT> refers to the
|
||||
# **component** specific values. Note however that ``<COMPONENT>`` refers to the
|
||||
# **grouping name** written in upper case. It may be either a component name or
|
||||
# a component GROUP name.
|
||||
#
|
||||
@@ -354,7 +354,28 @@
|
||||
# set by Debian policy
|
||||
# https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
|
||||
#
|
||||
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_SOURCE
|
||||
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SOURCE
|
||||
#
|
||||
# Sets the ``Source`` field of the binary Debian package.
|
||||
# When the binary package name is not the same as the source package name
|
||||
# (in particular when several components/binaries are generated from one
|
||||
# source) the source from which the binary has been generated should be
|
||||
# indicated with the field ``Source``.
|
||||
#
|
||||
# * Mandatory : NO
|
||||
# * Default :
|
||||
#
|
||||
# - An empty string for non-component based installations
|
||||
# - :variable:`CPACK_DEBIAN_PACKAGE_SOURCE` for component-based
|
||||
# installations.
|
||||
#
|
||||
# See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
|
||||
#
|
||||
# .. note::
|
||||
#
|
||||
# This value is not interpreted. It is possible to pass an optional
|
||||
# revision number of the referenced source package as well.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
@@ -554,6 +575,15 @@ function(cpack_deb_prepare_package_vars)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Source: (optional)
|
||||
# in case several packages are constructed from a unique source
|
||||
# (multipackaging), the source may be indicated as well.
|
||||
# The source might contain a version if the generated package
|
||||
# version is different from the source version
|
||||
if(NOT CPACK_DEBIAN_PACKAGE_SOURCE)
|
||||
set(CPACK_DEBIAN_PACKAGE_SOURCE "")
|
||||
endif()
|
||||
|
||||
# have a look at get_property(result GLOBAL PROPERTY ENABLED_FEATURES),
|
||||
# this returns the successful find_package() calls, maybe this can help
|
||||
# Depends:
|
||||
@@ -563,15 +593,15 @@ function(cpack_deb_prepare_package_vars)
|
||||
# if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_${dependency_type_}
|
||||
# automatic dependency discovery will be performed afterwards.
|
||||
if(CPACK_DEB_PACKAGE_COMPONENT)
|
||||
foreach(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES)
|
||||
foreach(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE)
|
||||
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${dependency_type_}")
|
||||
|
||||
# if set, overrides the global dependency
|
||||
if(DEFINED ${_component_var})
|
||||
set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${${_component_var}}")
|
||||
if(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||
message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_}"
|
||||
"dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_}}'")
|
||||
message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_} "
|
||||
"dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_type_}}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -672,15 +702,16 @@ function(cpack_deb_prepare_package_vars)
|
||||
|
||||
# Print out some debug information if we were asked for that
|
||||
if(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = ${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = '${CPACK_TOPLEVEL_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = '${CPACK_TOPLEVEL_TAG}'")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = '${CPACK_TEMPORARY_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = '${CPACK_OUTPUT_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = '${CPACK_OUTPUT_FILE_PATH}'")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = '${CPACK_PACKAGE_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = '${CPACK_PACKAGE_INSTALL_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = '${CPACK_TEMPORARY_PACKAGE_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = '${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}'")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_SOURCE = '${CPACK_DEBIAN_PACKAGE_SOURCE}'")
|
||||
endif()
|
||||
|
||||
# For debian source packages:
|
||||
@@ -719,6 +750,8 @@ function(cpack_deb_prepare_package_vars)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" PARENT_SCOPE)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
|
||||
"${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}" PARENT_SCOPE)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_SOURCE
|
||||
"${CPACK_DEBIAN_PACKAGE_SOURCE}" PARENT_SCOPE)
|
||||
set(GEN_WDIR "${WDIR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user