freepdfeditor/cmake/packaging/Linux.cmake

30 lines
1.4 KiB
CMake

# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 ai-ad4 and the FreePDFEditor contributors
# Linux packaging: .deb, .rpm, AppImage, portable tarball (§12.1).
set(CPACK_GENERATOR "DEB;RPM;TXZ")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/freepdfeditor")
# --- .deb ---
set(CPACK_DEBIAN_PACKAGE_NAME "freepdfeditor")
set(CPACK_DEBIAN_PACKAGE_SECTION "graphics")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libc6 (>= 2.31), libqt6-core (>= 6.7), libqt6-gui (>= 6.7), libqt6-widgets (>= 6.7), libqt6-network (>= 6.7)")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "FreePDFEditor <security@freepdfeditor.org>")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # we bundle most deps under /opt
# --- .rpm ---
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3.0-or-later")
set(CPACK_RPM_PACKAGE_VENDOR "FreePDFEditor")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Graphics")
set(CPACK_RPM_PACKAGE_REQUIRES "qt6-core >= 6.7, qt6-gui >= 6.7, qt6-widgets >= 6.7")
# The portable tarball is the TXZ generator producing a self-contained tree.
set(CPACK_ARCHIVE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-linux-${CMAKE_SYSTEM_PROCESSOR}")
# AppImage is produced by a custom script invoked from the release pipeline
# (§12.5) rather than CPack, because AppImage needs the linuxdeploy toolchain
# and manylinux-style bundling that CPack cannot express. See
# packaging/appimage/build-appimage.sh.