2019-12-17 06:41:44 +08:00
|
|
|
if ((NOT GENERATE_EL6) AND (NOT "$ENV{GENERATE_EL6}" STREQUAL ""))
|
|
|
|
if (("$ENV{GENERATE_EL6}" STREQUAL "ON") OR ("$ENV{GENERATE_EL6}" STREQUAL "1") OR ("$ENV{GENERATE_EL6}" STREQUAL "YES"))
|
|
|
|
set(GENERATE_EL6 ON)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-28 12:17:11 +08:00
|
|
|
# RPM specifics
|
|
|
|
if(CPACK_GENERATOR MATCHES "RPM")
|
2019-03-02 06:13:16 +08:00
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
2019-12-17 06:41:44 +08:00
|
|
|
if(GENERATE_EL6)
|
2019-12-17 16:10:06 +08:00
|
|
|
message(STATUS "Building EL6 components")
|
2019-12-16 16:13:17 +08:00
|
|
|
set(CPACK_COMPONENTS_ALL clients-el6 server-el6)
|
2019-12-17 06:41:44 +08:00
|
|
|
else()
|
2019-12-17 16:10:06 +08:00
|
|
|
message(STATUS "Building EL7 components")
|
2019-12-17 06:41:44 +08:00
|
|
|
set(CPACK_COMPONENTS_ALL clients-el7 server-el7)
|
2019-03-02 08:02:51 +08:00
|
|
|
endif()
|
2019-03-01 06:05:24 +08:00
|
|
|
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md)
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
|
2019-02-28 12:17:11 +08:00
|
|
|
elseif(CPACK_GENERATOR MATCHES "DEB")
|
2019-03-02 06:13:16 +08:00
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
2019-02-28 12:17:11 +08:00
|
|
|
set(CPACK_COMPONENTS_ALL clients-deb server-deb)
|
2019-03-01 06:05:24 +08:00
|
|
|
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md)
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
|
2019-05-12 05:42:48 +08:00
|
|
|
elseif(CPACK_GENERATOR MATCHES "productbuild")
|
2019-03-02 06:13:16 +08:00
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
2019-02-28 12:17:11 +08:00
|
|
|
set(CPACK_COMPONENTS_ALL clients-pm server-pm)
|
|
|
|
set(CPACK_STRIP_FILES TRUE)
|
|
|
|
set(CPACK_PREFLIGHT_SERVER_SCRIPT ${CMAKE_SOURCE_DIR}/packaging/osx/scripts-server/preinstall)
|
|
|
|
set(CPACK_POSTFLIGHT_SERVER_SCRIPT ${CMAKE_SOURCE_DIR}/packaging/osx/scripts-server/postinstall)
|
|
|
|
set(CPACK_POSTFLIGHT_CLIENTS_SCRIPT ${CMAKE_SOURCE_DIR}/packaging/osx/scripts-server/preinstall)
|
2019-05-03 15:12:07 +08:00
|
|
|
# Commenting out this readme file until it works within packaging
|
2019-05-12 05:42:48 +08:00
|
|
|
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/packaging/osx/resources/conclusion.rtf)
|
2019-03-01 06:05:24 +08:00
|
|
|
set(CPACK_PRODUCTBUILD_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/packaging/osx/resources)
|
2019-05-03 15:12:07 +08:00
|
|
|
# Changing the path of this file as CMAKE_BINARY_DIR does not seem to be defined
|
2019-05-12 05:42:48 +08:00
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_BINARY_DIR}/License.txt)
|
2019-12-12 10:43:15 +08:00
|
|
|
if(NOT FDB_RELEASE)
|
2019-12-15 23:13:46 +08:00
|
|
|
set(prerelease_string "-PRERELEASE")
|
2019-12-24 03:50:01 +08:00
|
|
|
else()
|
|
|
|
set(prerelease_string "")
|
2019-12-12 10:43:15 +08:00
|
|
|
endif()
|
2019-12-15 23:13:46 +08:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "FoundationDB-${PROJECT_VERSION}${prerelease_string}")
|
2019-02-28 12:17:11 +08:00
|
|
|
elseif(CPACK_GENERATOR MATCHES "TGZ")
|
|
|
|
set(CPACK_STRIP_FILES TRUE)
|
|
|
|
set(CPACK_COMPONENTS_ALL clients-tgz server-tgz)
|
2019-03-01 06:05:24 +08:00
|
|
|
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md)
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
|
2019-02-28 12:17:11 +08:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported package format ${CPACK_GENERATOR}")
|
|
|
|
endif()
|