diff options
Diffstat (limited to 'installer')
-rw-r--r-- | installer/CMakeLists.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/installer/CMakeLists.txt b/installer/CMakeLists.txt new file mode 100644 index 0000000..ef8aba8 --- /dev/null +++ b/installer/CMakeLists.txt @@ -0,0 +1,49 @@ +set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") +set(CPACK_PACKAGE_CONTACT "${PROJECT_MAINTAINER}") +set(CPACK_PACKAGE_VERSION ${ejdb_VERSION}) +set(CPACK_PACKAGE_VERSION_MAJOR ${ejdb_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${ejdb_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${ejdb_VERSION_PATCH}) +set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR}) +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION_SUMMARY}) +set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README") +set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README") +set(CPACK_PACKAGE_FILE_NAME +"${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_BUILD_TYPE}-${CMAKE_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}") +if (CMAKE_BUILD_TYPE STREQUAL "Release") + set(CPACK_STRIP_FILES ON) +endif() + +if (PACKAGE_DEB) + execute_process ( + COMMAND /usr/bin/dpkg --print-architecture + OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE + RESULT_VARIABLE EXECUTE_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + if (EXECUTE_RESULT) + message(FATAL_ERROR "dpkg not found: No package generation.") + endif() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION}) + set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROJECT_WEBSITE}) + set(CPACK_DEBIAN_PACKAGE_SECTION libs) + set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) + set(CPACK_DEBIAN_PACKAGE_DEPENDS zlib1g) + set(CPACK_DEBIAN_PACKAGE_BUILD_DEPENDS pkg-config git devscripts dh-make zlib1g-dev) + set(PPA_DEBIAN_VERSION ppa3) + if (PROJECT_PPA) + set(DPUT_HOST ${PROJECT_PPA}) + endif() + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "any") + set(CPACK_DEBIAN_RESOURCE_FILE_CHANGELOG ${CMAKE_SOURCE_DIR}/Changelog) + set(CPACK_DEBIAN_UPDATE_CHANGELOG ON) +endif(PACKAGE_DEB) + +include(CPack) + +if (ENABLE_PPA) + include(UploadPPA) +endif() |