cpack deb

This commit is contained in:
2026-04-28 16:43:43 +08:00
parent 537f0ddb1e
commit acade5c35b
8 changed files with 67 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ if(WITH_HTTP_SERVER)
find_package(Qt6 6.8 COMPONENTS HttpServer)
endif()
include(GNUInstallDirs)
add_subdirectory(src/core)
add_subdirectory(src/app)
@@ -30,3 +32,31 @@ if(BUILD_TESTS)
find_package(Qt6 REQUIRED COMPONENTS Test)
add_subdirectory(tests)
endif()
install(DIRECTORY data/icons/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
)
install(FILES data/org.localsend.localsend-qt.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
)
set(CPACK_PACKAGE_NAME "localsend-qt")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Share files between devices on the local network")
set(CPACK_PACKAGE_DESCRIPTION "LocalSend Qt is a native Qt6 client for the LocalSend protocol, \
allowing fast and secure file sharing between devices on the same local network.")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://localsend.org")
set(CPACK_PACKAGE_CONTACT "LocalSend Qt Developers")
set(CPACK_PACKAGE_LICENSE "MIT")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${PROJECT_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6core6 (>= 6.8), libqt6network6 (>= 6.8), libqt6quick6 (>= 6.8), libqt6quickcontrols2-6 (>= 6.8), libqt6httpserver6 (>= 6.8), libc6")
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
set(CPACK_DEBIAN_COMPRESSION_TYPE "zstd")
include(CPack)