summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-11-26 19:08:25 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2016-11-27 22:20:35 (GMT)
commit6d51bea4e6ff058383e63c215ec5fb7fcab9870c (patch)
treebb1fc3a76009053694d0bda82bdf672aa7bac56c
parent0f15aee799a0af9fe1999d5c071483c9660ccf5b (diff)
downloadCMake-6d51bea4e6ff058383e63c215ec5fb7fcab9870c.zip
CMake-6d51bea4e6ff058383e63c215ec5fb7fcab9870c.tar.gz
CMake-6d51bea4e6ff058383e63c215ec5fb7fcab9870c.tar.bz2
Tests: CPack test merge generator specifics
Merge test generator specifics into test itself.
-rw-r--r--Tests/RunCMake/CPack/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake3
-rw-r--r--Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-specifics.cmake6
-rw-r--r--Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake23
-rw-r--r--Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake2
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake3
-rw-r--r--Tests/RunCMake/CPack/DEB/MINIMAL-specifics.cmake2
-rw-r--r--Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake7
-rw-r--r--Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-specifics.cmake5
-rw-r--r--Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake22
-rw-r--r--Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-specifics.cmake19
-rw-r--r--Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake5
-rw-r--r--Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-specifics.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/test.cmake10
-rw-r--r--Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake15
-rw-r--r--Tests/RunCMake/CPack/tests/DEPENDENCIES/test.cmake49
-rw-r--r--Tests/RunCMake/CPack/tests/EMPTY_DIR/test.cmake5
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake22
-rw-r--r--Tests/RunCMake/CPack/tests/LONG_FILENAMES/test.cmake6
-rw-r--r--Tests/RunCMake/CPack/tests/MINIMAL/test.cmake5
-rw-r--r--Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake16
21 files changed, 127 insertions, 104 deletions
diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt
index c4d9d5d..e06fa1c 100644
--- a/Tests/RunCMake/CPack/CMakeLists.txt
+++ b/Tests/RunCMake/CPack/CMakeLists.txt
@@ -7,10 +7,5 @@ string(TOLOWER "${RunCMake_TEST_FILE_PREFIX}" CPACK_PACKAGE_NAME)
include(tests/${RunCMake_TEST_FILE_PREFIX}/test.cmake)
-# include test generator specifics
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${GENERATOR_TYPE}/${RunCMake_TEST_FILE_PREFIX}-specifics.cmake")
- include("${GENERATOR_TYPE}/${RunCMake_TEST_FILE_PREFIX}-specifics.cmake")
-endif()
-
set(CPACK_GENERATOR "${GENERATOR_TYPE}")
include(CPack)
diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake
deleted file mode 100644
index 4b4ac8d..0000000
--- a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEB_COMPONENT_INSTALL "ON")
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
diff --git a/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-specifics.cmake
deleted file mode 100644
index c64f161..0000000
--- a/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-specifics.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEB_COMPONENT_INSTALL "ON")
-
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
-set(CPACK_DEBIAN_PKG_2_PACKAGE_NAME "second")
-set(CPACK_DEBIAN_PKG_3_FILE_NAME "pkg_3_abc.deb")
diff --git a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake
deleted file mode 100644
index 5f82cc6..0000000
--- a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-specifics.cmake
+++ /dev/null
@@ -1,23 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEB_COMPONENT_INSTALL "ON")
-#intentionaly commented out to test old file naming
-#set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
-
-# false by default
-set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS FALSE)
-# FIXME can not be tested as libraries first have to be part of a package in order
-# to determine their dependencies and we can not be certain if there will be any
-set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_SHLIBDEPS TRUE)
-
-foreach(dependency_type_ DEPENDS CONFLICTS PREDEPENDS ENHANCES BREAKS REPLACES RECOMMENDS SUGGESTS)
- string(TOLOWER "${dependency_type_}" lower_dependency_type_)
-
- set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b")
- set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b")
- set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b")
- set(CPACK_DEBIAN_HEADERS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-headers")
-endforeach()
-
-set(CPACK_DEBIAN_PACKAGE_PROVIDES "provided-default, provided-default-b")
-set(CPACK_DEBIAN_LIBS_PACKAGE_PROVIDES "provided-lib")
-set(CPACK_DEBIAN_LIBS_AUTO_PACKAGE_PROVIDES "provided-lib_auto, provided-lib_auto-b")
diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake
deleted file mode 100644
index 4e9a2e7..0000000
--- a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake
deleted file mode 100644
index 39a6be4..0000000
--- a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
-set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
diff --git a/Tests/RunCMake/CPack/DEB/MINIMAL-specifics.cmake b/Tests/RunCMake/CPack/DEB/MINIMAL-specifics.cmake
deleted file mode 100644
index 4e9a2e7..0000000
--- a/Tests/RunCMake/CPack/DEB/MINIMAL-specifics.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake
deleted file mode 100644
index 25bd2e7..0000000
--- a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-set(CPACK_PACKAGE_CONTACT "someone")
-set(CPACK_DEB_COMPONENT_INSTALL "ON")
-set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
-
-set(CPACK_DEBIAN_PACKAGE_SECTION "default")
-set(CPACK_DEBIAN_PKG_2_PACKAGE_NAME "second")
-set(CPACK_DEBIAN_PKG_2_PACKAGE_SECTION "second_group")
diff --git a/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-specifics.cmake b/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-specifics.cmake
deleted file mode 100644
index 575aa01..0000000
--- a/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-specifics.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-set(CPACK_RPM_COMPONENT_INSTALL "ON")
-
-set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
-set(CPACK_RPM_PKG_2_PACKAGE_NAME "second")
-set(CPACK_RPM_PKG_3_FILE_NAME "pkg_3_abc.rpm")
diff --git a/Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake b/Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake
deleted file mode 100644
index 8b7fb1e..0000000
--- a/Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-set(CPACK_RPM_COMPONENT_INSTALL "ON")
-
-# FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild
-# does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755
-set(CPACK_RPM_PACKAGE_AUTOREQ "no")
-set(CPACK_RPM_PACKAGE_AUTOPROV "no")
-set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_AUTOREQPROV "yes")
-set(CPACK_RPM_LIBS_AUTO_PACKAGE_AUTOREQPROV "yes")
-
-set(CPACK_RPM_PACKAGE_REQUIRES "depend-default, depend-default-b")
-set(CPACK_RPM_APPLICATIONS_PACKAGE_REQUIRES "depend-application, depend-application-b")
-set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_REQUIRES "depend-application, depend-application-b")
-set(CPACK_RPM_HEADERS_PACKAGE_REQUIRES "depend-headers")
-
-set(CPACK_RPM_PACKAGE_CONFLICTS "conflict-default, conflict-default-b")
-set(CPACK_RPM_APPLICATIONS_PACKAGE_CONFLICTS "conflict-application, conflict-application-b")
-set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_CONFLICTS "conflict-application, conflict-application-b")
-set(CPACK_RPM_HEADERS_PACKAGE_CONFLICTS "conflict-headers")
-
-set(CPACK_RPM_PACKAGE_PROVIDES "provided-default, provided-default-b")
-set(CPACK_RPM_LIBS_PACKAGE_PROVIDES "provided-lib")
-set(CPACK_RPM_LIBS_AUTO_PACKAGE_PROVIDES "provided-lib_auto, provided-lib_auto-b")
diff --git a/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-specifics.cmake b/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-specifics.cmake
deleted file mode 100644
index 4eb53c3..0000000
--- a/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-specifics.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-set(CPACK_RPM_COMPONENT_INSTALL "ON")
-
-set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh")
-set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh")
-set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh")
-set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh")
-
-set(CPACK_RPM_foo_PRE_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh")
-set(CPACK_RPM_foo_POST_INSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh")
-set(CPACK_RPM_foo_PRE_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh")
-set(CPACK_RPM_foo_POST_UNINSTALL_SCRIPT_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh")
diff --git a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake
deleted file mode 100644
index 524ef0c..0000000
--- a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-set(CPACK_RPM_COMPONENT_INSTALL "ON")
-
-set(CPACK_RPM_PACKAGE_GROUP "default")
-set(CPACK_RPM_PKG_2_PACKAGE_NAME "second")
-set(CPACK_RPM_PKG_2_PACKAGE_GROUP "second_group")
diff --git a/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-specifics.cmake
deleted file mode 100644
index 81a5035..0000000
--- a/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-specifics.cmake
+++ /dev/null
@@ -1 +0,0 @@
-set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
diff --git a/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/test.cmake b/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/test.cmake
index 9cd91af..1ad01c1 100644
--- a/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/test.cmake
+++ b/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/test.cmake
@@ -1,3 +1,13 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+elseif(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+elseif(GENERATOR_TYPE STREQUAL "TGZ")
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
+endif()
+
set(CPACK_COMPONENTS_ALL test)
install(DIRECTORY DESTINATION empty
COMPONENT test)
diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake
index 115864f..3185e9f 100644
--- a/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake
@@ -1,4 +1,17 @@
-set(CPACK_RPM_COMPONENT_INSTALL "ON")
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+ set(CPACK_DEBIAN_PKG_2_PACKAGE_NAME "second")
+ set(CPACK_DEBIAN_PKG_3_FILE_NAME "pkg_3_abc.deb")
+elseif(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+
+ set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
+ set(CPACK_RPM_PKG_2_PACKAGE_NAME "second")
+ set(CPACK_RPM_PKG_3_FILE_NAME "pkg_3_abc.rpm")
+endif()
install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_1)
install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_2)
diff --git a/Tests/RunCMake/CPack/tests/DEPENDENCIES/test.cmake b/Tests/RunCMake/CPack/tests/DEPENDENCIES/test.cmake
index 4499a7a..cabbba8 100644
--- a/Tests/RunCMake/CPack/tests/DEPENDENCIES/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEPENDENCIES/test.cmake
@@ -1,3 +1,52 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+ #intentionaly commented out to test old file naming
+ #set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+
+ # false by default
+ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS FALSE)
+ # FIXME can not be tested as libraries first have to be part of a package in order
+ # to determine their dependencies and we can not be certain if there will be any
+ set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_SHLIBDEPS TRUE)
+
+ foreach(dependency_type_ DEPENDS CONFLICTS PREDEPENDS ENHANCES BREAKS REPLACES RECOMMENDS SUGGESTS)
+ string(TOLOWER "${dependency_type_}" lower_dependency_type_)
+
+ set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b")
+ set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b")
+ set(CPACK_DEBIAN_APPLICATIONS_AUTO_PACKAGE_${dependency_type_} "${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b")
+ set(CPACK_DEBIAN_HEADERS_PACKAGE_${dependency_type_} "${lower_dependency_type_}-headers")
+ endforeach()
+
+ set(CPACK_DEBIAN_PACKAGE_PROVIDES "provided-default, provided-default-b")
+ set(CPACK_DEBIAN_LIBS_PACKAGE_PROVIDES "provided-lib")
+ set(CPACK_DEBIAN_LIBS_AUTO_PACKAGE_PROVIDES "provided-lib_auto, provided-lib_auto-b")
+elseif(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+
+ # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild
+ # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755
+ set(CPACK_RPM_PACKAGE_AUTOREQ "no")
+ set(CPACK_RPM_PACKAGE_AUTOPROV "no")
+ set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_AUTOREQPROV "yes")
+ set(CPACK_RPM_LIBS_AUTO_PACKAGE_AUTOREQPROV "yes")
+
+ set(CPACK_RPM_PACKAGE_REQUIRES "depend-default, depend-default-b")
+ set(CPACK_RPM_APPLICATIONS_PACKAGE_REQUIRES "depend-application, depend-application-b")
+ set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_REQUIRES "depend-application, depend-application-b")
+ set(CPACK_RPM_HEADERS_PACKAGE_REQUIRES "depend-headers")
+
+ set(CPACK_RPM_PACKAGE_CONFLICTS "conflict-default, conflict-default-b")
+ set(CPACK_RPM_APPLICATIONS_PACKAGE_CONFLICTS "conflict-application, conflict-application-b")
+ set(CPACK_RPM_APPLICATIONS_AUTO_PACKAGE_CONFLICTS "conflict-application, conflict-application-b")
+ set(CPACK_RPM_HEADERS_PACKAGE_CONFLICTS "conflict-headers")
+
+ set(CPACK_RPM_PACKAGE_PROVIDES "provided-default, provided-default-b")
+ set(CPACK_RPM_LIBS_PACKAGE_PROVIDES "provided-lib")
+ set(CPACK_RPM_LIBS_AUTO_PACKAGE_PROVIDES "provided-lib_auto, provided-lib_auto-b")
+endif()
+
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp"
diff --git a/Tests/RunCMake/CPack/tests/EMPTY_DIR/test.cmake b/Tests/RunCMake/CPack/tests/EMPTY_DIR/test.cmake
index 7bec17d..e435ced 100644
--- a/Tests/RunCMake/CPack/tests/EMPTY_DIR/test.cmake
+++ b/Tests/RunCMake/CPack/tests/EMPTY_DIR/test.cmake
@@ -1,2 +1,7 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+endif()
+
install(DIRECTORY DESTINATION empty
COMPONENT test)
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
index 9b3e856..e16f8e1 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
@@ -1,3 +1,25 @@
+if(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+
+ set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh")
+ set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_install.sh")
+ set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh")
+ set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh")
+
+ set(CPACK_RPM_foo_PRE_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh")
+ set(CPACK_RPM_foo_POST_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_install_foo.sh")
+ set(CPACK_RPM_foo_PRE_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh")
+ set(CPACK_RPM_foo_POST_UNINSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh")
+endif()
+
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
# default
diff --git a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/test.cmake b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/test.cmake
index 3370a50..f6656c6 100644
--- a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/test.cmake
+++ b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/test.cmake
@@ -1,3 +1,9 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+ set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
+endif()
+
set(LONG_FILENAME
"${CMAKE_CURRENT_BINARY_DIR}/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt")
diff --git a/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake b/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake
index 83ed0f2..2182f46 100644
--- a/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake
@@ -1 +1,6 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+endif()
+
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
diff --git a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake
index 703c1b7..b042092 100644
--- a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake
@@ -1,3 +1,19 @@
+if(GENERATOR_TYPE STREQUAL "DEB")
+ set(CPACK_PACKAGE_CONTACT "someone")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+
+ set(CPACK_DEBIAN_PACKAGE_SECTION "default")
+ set(CPACK_DEBIAN_PKG_2_PACKAGE_NAME "second")
+ set(CPACK_DEBIAN_PKG_2_PACKAGE_SECTION "second_group")
+elseif(GENERATOR_TYPE STREQUAL "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+
+ set(CPACK_RPM_PACKAGE_GROUP "default")
+ set(CPACK_RPM_PKG_2_PACKAGE_NAME "second")
+ set(CPACK_RPM_PKG_2_PACKAGE_GROUP "second_group")
+endif()
+
install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_1)
install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_2)
install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_3)