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

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
build/
*.user
*.autosave
*.qmlc
*.jsc
CMakeLists.txt.user
cmake-build-*/
.idea/
.vscode/
.cache/

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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=LocalSend Qt
GenericName=File Transfer
Comment=Share files between devices on the local network
Exec=localsend-qt
Icon=localsend-qt
Terminal=false
Categories=Network;FileTransfer;Qt;
Keywords=transfer;share;files;local;network;
StartupNotify=true
StartupWMClass=LocalSend

View File

@@ -4,6 +4,10 @@ qt_add_executable(LocalSendQt
AppController.cpp
)
set_target_properties(LocalSendQt PROPERTIES
OUTPUT_NAME localsend-qt
)
qt_add_qml_module(LocalSendQt
URI LocalSend
VERSION 1.0
@@ -18,6 +22,7 @@ target_link_libraries(LocalSendQt PRIVATE
)
install(TARGETS LocalSendQt
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

View File

@@ -53,3 +53,13 @@ set_target_properties(LocalSendCore PROPERTIES
SOVERSION 1
OUTPUT_NAME localsend-core
)
install(TARGETS LocalSendCore
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
if(INSTALL_DEVEL_HEADERS)
install(DIRECTORY include/LocalSendCore
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
endif()