Commit a45a4b2d authored by Markus Rickert's avatar Markus Rickert Committed by Brad King

CPackDeb: set package control field per component

parent a60574f1
......@@ -27,6 +27,7 @@
# However as a handy reminder here comes the list of specific variables:
#
# .. variable:: CPACK_DEBIAN_PACKAGE_NAME
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
#
# The Debian package summary
#
......@@ -603,7 +604,7 @@ function(cpack_deb_prepare_package_vars)
# if per-component variable, overrides the global CPACK_DEBIAN_PACKAGE_${variable_type_}
# automatic dependency discovery will be performed afterwards.
if(CPACK_DEB_PACKAGE_COMPONENT)
foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY)
foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY NAME)
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${value_type_}")
# if set, overrides the global variable
......@@ -704,10 +705,11 @@ function(cpack_deb_prepare_package_vars)
endif()
endforeach()
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
else()
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME)
string(TOLOWER "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
else()
string(TOLOWER "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_DEB_PACKAGE_COMPONENT}" CPACK_DEBIAN_PACKAGE_NAME)
endif()
endif()
# Print out some debug information if we were asked for that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment