summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-17 14:36:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-17 14:36:15 (GMT)
commit536b6c7519e221573cdf96db13b9d72b65c80b0b (patch)
tree2e96a19fb3a21352ee39dce61fa9849688cb8f12 /Modules
parent386e1f796ca622e87f822b71e121c611cc184d47 (diff)
parent3e6b2ab6832f77a7e073b55331352a88a5d28488 (diff)
downloadCMake-536b6c7519e221573cdf96db13b9d72b65c80b0b.zip
CMake-536b6c7519e221573cdf96db13b9d72b65c80b0b.tar.gz
CMake-536b6c7519e221573cdf96db13b9d72b65c80b0b.tar.bz2
Merge topic 'cpack-per-component-extra-control-file'
3e6b2ab6 CPack/DEB: component version of PACKAGE_CONTROL_EXTRA 506f6bc0 CPack/DEB: Remove duplicate string(TOUPPER) calls 32e9276a Tests/RunCMake/CPack/DEB: add verifyDebControl 47d1f118 Tests/RunCMake/CPack: found files should be preserved
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 09cddcd..75e9966 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -272,6 +272,7 @@
#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA
#
# This variable allow advanced user to add custom script to the
# control.tar.gz.
@@ -498,7 +499,6 @@ function(cpack_deb_prepare_package_vars)
# if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_DEPENDS
# automatic dependency discovery will be performed afterwards.
if(CPACK_DEB_PACKAGE_COMPONENT)
- string(TOUPPER "${CPACK_DEB_PACKAGE_COMPONENT}" _local_component_name)
set(_component_depends_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_DEPENDS")
# if set, overrides the global dependency
@@ -542,7 +542,6 @@ function(cpack_deb_prepare_package_vars)
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
endif()
else()
- string(TOUPPER ${CPACK_DEB_PACKAGE_COMPONENT} _local_component_name)
set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
# component description overrides package description
@@ -584,13 +583,20 @@ function(cpack_deb_prepare_package_vars)
# - conffiles
# - postinst
# - postrm
- # - prerm"
+ # - prerm
# Usage:
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
# Are we packaging components ?
if(CPACK_DEB_PACKAGE_COMPONENT)
+ # override values with per component version if set
+ foreach(VAR_NAME_ "PACKAGE_CONTROL_EXTRA")
+ if(CPACK_DEBIAN_${_local_component_name}_${VAR_NAME_})
+ set(CPACK_DEBIAN_${VAR_NAME_} "${CPACK_DEBIAN_${_local_component_name}_${VAR_NAME_}}")
+ 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()