summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2015-07-13 20:25:44 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-15 14:00:03 (GMT)
commit3e6b2ab6832f77a7e073b55331352a88a5d28488 (patch)
tree46c9f9748023009bfa95da280eb4ac81cdacc962 /Modules
parent506f6bc0d269653cbba27257b9fed350365037c3 (diff)
downloadCMake-3e6b2ab6832f77a7e073b55331352a88a5d28488.zip
CMake-3e6b2ab6832f77a7e073b55331352a88a5d28488.tar.gz
CMake-3e6b2ab6832f77a7e073b55331352a88a5d28488.tar.bz2
CPack/DEB: component version of PACKAGE_CONTROL_EXTRA
Component version of CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA variable.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index cbb7c33..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.
@@ -582,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()