74 lines
2.7 KiB
CMake
74 lines
2.7 KiB
CMake
# This file contains the CPack configuration for packaging Bloom. Bloom is currently packaged in Debian and RPM
|
|
# packages. To package Bloom, simply run CPack from the CMake build directory:
|
|
#
|
|
# $ cd build/cmake-build-release/
|
|
# $ cpack
|
|
#
|
|
# CPack's -G option can be used to specify a particular generator:
|
|
# $ cpack -G DEB
|
|
#
|
|
# If no generator has been specified, CPack will generate packages for all configured generators (see CPACK_GENERATOR
|
|
# in Bloom's root CMakeLists.txt).
|
|
#
|
|
# NOTE: The above commands assume Bloom has been built in 'release' mode, and the install target has been run.
|
|
|
|
set(CPACK_PACKAGE_NAME "Bloom")
|
|
|
|
set(
|
|
CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
|
"A debug interface for embedded systems development on Linux. Bloom supports most Microchip AVR8 targets, along with numerous EDBG-based debug tools."
|
|
)
|
|
|
|
set(CPACK_PACKAGE_CONTACT "Nav Mohammed <support@bloom.oscillate.io>")
|
|
|
|
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/bloom")
|
|
|
|
|
|
if (CPACK_GENERATOR MATCHES "DEB")
|
|
# For Debian packages, we have to specify our own dependency list. We can't use the automatic dependency generator
|
|
# because CPack doesn't allow us to exclude dependencies that are shipped with Bloom. CPack uses dpkg-shlibdeps to
|
|
# generate the dependencies, and there appears to be a -x option to exclude certain packages, but CPack doesn't
|
|
# yet support this.
|
|
|
|
# This list could probably be reduced. It was generated by CPack (via dpkg-shlibdeps)
|
|
string(
|
|
CONCAT
|
|
CPACK_DEBIAN_PACKAGE_DEPENDS
|
|
"libc6 (>= 2.18), "
|
|
"libfontconfig1 (>= 2.11.94), "
|
|
"libfreetype6 (>= 2.6), "
|
|
"libgcc1 (>= 1:4.2), "
|
|
"libgl1-mesa-glx | libgl1, "
|
|
"libstdc++6 (>= 5), "
|
|
"libudev1 (>= 183), "
|
|
"libx11-6, "
|
|
"libx11-xcb1, "
|
|
"libxcb-icccm4 (>= 0.4.1), "
|
|
"libxcb-image0 (>= 0.2.1), "
|
|
"libxcb-keysyms1 (>= 0.4.0), "
|
|
"libxcb-render-util0, "
|
|
"libxext6, "
|
|
"libxkbcommon-x11-0 (>= 0.5.0), "
|
|
"libxkbcommon0 (>= 0.5.0), "
|
|
"libxrender1, "
|
|
"zlib1g (>= 1:1.1.4)"
|
|
)
|
|
|
|
set(
|
|
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postinst;
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postrm
|
|
)
|
|
|
|
elseif (CPACK_GENERATOR MATCHES "RPM")
|
|
set(CPACK_RPM_PACKAGE_LICENSE "LGPLv3+")
|
|
set(CPACK_RPM_PACKAGE_GROUP "Development/Debuggers")
|
|
|
|
set(CPACK_RPM_PACKAGE_AUTOREQ ON)
|
|
set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "bin/lib/")
|
|
|
|
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postinst)
|
|
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postrm)
|
|
endif()
|