2011-01-30 15:11:25 +03:00
|
|
|
#
|
|
|
|
# Activate component packaging
|
|
|
|
#
|
|
|
|
if(CPACK_GENERATOR MATCHES "ZIP")
|
|
|
|
set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2011-01-30 15:11:25 +03:00
|
|
|
|
|
|
|
if(CPACK_GENERATOR MATCHES "RPM")
|
2015-01-21 02:29:46 +03:00
|
|
|
set(CPACK_RPM_COMPONENT_INSTALL "ON")
|
2015-02-27 02:33:48 +03:00
|
|
|
|
|
|
|
# test that /usr and /usr/foo get omitted in relocatable
|
|
|
|
# rpms as shortest relocation path is treated as base of
|
|
|
|
# package (/usr/foo/bar is relocatable and must exist)
|
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/foo/bar")
|
|
|
|
|
|
|
|
# test requires
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_APPLICATIONS_PACKAGE_REQUIRES "mylib-libraries")
|
2014-10-14 09:57:11 +04:00
|
|
|
|
2015-02-19 11:01:16 +03:00
|
|
|
# test a "noarch" rpm
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_ARCHITECTURE "noarch")
|
2015-02-19 11:01:16 +03:00
|
|
|
|
|
|
|
# test cross-built rpm
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_APPLICATIONS_PACKAGE_ARCHITECTURE "armv7hf")
|
2015-02-19 11:01:16 +03:00
|
|
|
|
2015-03-17 00:10:18 +03:00
|
|
|
# test package summary override - headers rpm is generated in the middle
|
2015-01-21 02:29:46 +03:00
|
|
|
set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_SUMMARY "headers summary")
|
2015-01-21 02:29:46 +03:00
|
|
|
|
2015-03-17 00:10:18 +03:00
|
|
|
# test package description override - headers rpm is generated in the middle
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_DESCRIPTION "headers description")
|
2015-03-20 23:52:49 +03:00
|
|
|
|
|
|
|
# test package do not use CPACK_PACKAGING_INSTALL_PREFIX
|
|
|
|
# as relocation path
|
2016-02-13 04:09:32 +03:00
|
|
|
set(CPACK_RPM_NO_LIBRARIES_INSTALL_PREFIX_RELOCATION true)
|
2016-03-29 01:51:18 +03:00
|
|
|
|
|
|
|
# test default permissions
|
|
|
|
set(CPACK_RPM_DEFAULT_USER defusr)
|
|
|
|
set(CPACK_RPM_DEFAULT_GROUP defgrp)
|
|
|
|
set(CPACK_RPM_DEFAULT_FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ)
|
|
|
|
set(CPACK_RPM_DEFAULT_DIR_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ)
|
|
|
|
set(CPACK_RPM_LIBRARIES_DEFAULT_USER user)
|
|
|
|
set(CPACK_RPM_APPLICATIONS_DEFAULT_GROUP group)
|
|
|
|
set(CPACK_RPM_LIBRARIES_DEFAULT_FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE)
|
|
|
|
set(CPACK_RPM_APPLICATIONS_DEFAULT_DIR_PERMISSIONS
|
|
|
|
OWNER_READ GROUP_READ WORLD_READ)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2011-01-30 15:11:25 +03:00
|
|
|
|
2011-03-11 10:47:15 +03:00
|
|
|
if(CPACK_GENERATOR MATCHES "DEB")
|
|
|
|
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2011-03-11 10:47:15 +03:00
|
|
|
|
2011-01-30 15:11:25 +03:00
|
|
|
#
|
|
|
|
# Choose grouping way
|
|
|
|
#
|
|
|
|
#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
|
|
|
|
#set(CPACK_COMPONENTS_GROUPING)
|
|
|
|
set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
|
2014-10-14 09:57:11 +04:00
|
|
|
#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
|