From 196ae84eb5a079775d74280563604029652f259f Mon Sep 17 00:00:00 2001 From: momen Date: Thu, 19 Jun 2025 00:35:38 +0800 Subject: [PATCH] =?UTF-8?q?chore:=E6=9B=B4=E6=96=B0debian=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 57 ++++++++++++++++++++++++++++ src/CMakeLists.txt => CMakeLists.txt | 38 +++++++++---------- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 12 ++++++ debian/copyright | 7 ++++ debian/install | 2 + debian/momodesk-mind.desktop | 9 +++++ debian/postrm | 11 ++++++ debian/rules | 7 ++++ debian/source/format | 1 + spark-update-tool.desktop | 9 +++++ src/mainwindow.ui | 1 - 13 files changed, 140 insertions(+), 20 deletions(-) rename src/CMakeLists.txt => CMakeLists.txt (69%) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/install create mode 100644 debian/momodesk-mind.desktop create mode 100644 debian/postrm create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 spark-update-tool.desktop diff --git a/.gitignore b/.gitignore index 75ea44d..79c9ac7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,60 @@ build .cache CMakeLists.txt.user CMakeLists.txt.user.* +obj-x86_64-linux-gnu +# C++ objects and libs +*.slo +*.lo +*.o +*.a +*.la +*.lai +*.so +*.dll +*.dylib + +# Qt-es +object_script.*.Release +object_script.*.Debug +*_plugin_import.cpp +/.qmake.cache +/.qmake.stash +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h +*.qmlc +*.jsc +Makefile* +*build-* + +# Qt unit tests +target_wrapper.* + +# Qt qm files +translations/*.qm + +# QtCreator +*.autosave + +# QtCreator Qml +*.qmlproject.user +*.qmlproject.user.* + +# QtCreator CMake +CMakeLists.txt.user* +build + +# Debian dpkg-buildpackage +debian/*.debhelper* +debian/files +debian/*.substvars +debian/spark-update-tool + +.vscode/* +src/spark-update-tool diff --git a/src/CMakeLists.txt b/CMakeLists.txt similarity index 69% rename from src/CMakeLists.txt rename to CMakeLists.txt index 10e7b56..6c624b4 100644 --- a/src/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(Spark-Update-Tool VERSION 0.1 LANGUAGES CXX) +project(spark-update-tool VERSION 0.1 LANGUAGES CXX) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) @@ -13,49 +13,49 @@ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network Concurrent) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network Concurrent) set(PROJECT_SOURCES - main.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui + src/main.cpp + src/mainwindow.cpp + src/mainwindow.h + src/mainwindow.ui ) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) - qt_add_executable(Spark-Update-Tool + qt_add_executable(spark-update-tool MANUAL_FINALIZATION ${PROJECT_SOURCES} - aptssupdater.h aptssupdater.cpp - icons.qrc - appdelegate.h appdelegate.cpp - applistmodel.h applistmodel.cpp - downloadmanager.h downloadmanager.cpp + src/aptssupdater.h src/aptssupdater.cpp + src/icons.qrc + src/appdelegate.h src/appdelegate.cpp + src/applistmodel.h src/applistmodel.cpp + src/downloadmanager.h src/downloadmanager.cpp ) # Define target properties for Android with Qt 6 as: -# set_property(TARGET Spark-Update-Tool APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR +# set_property(TARGET spark-update-tool APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR # ${CMAKE_CURRENT_SOURCE_DIR}/android) # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation else() if(ANDROID) - add_library(Spark-Update-Tool SHARED + add_library(spark-update-tool SHARED ${PROJECT_SOURCES} ) # Define properties for Android with Qt 5 after find_package() calls as: # set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") else() - add_executable(Spark-Update-Tool + add_executable(spark-update-tool ${PROJECT_SOURCES} ) endif() endif() -target_link_libraries(Spark-Update-Tool PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Concurrent) +target_link_libraries(spark-update-tool PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Concurrent) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. if(${QT_VERSION} VERSION_LESS 6.1.0) - set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.Spark-Update-Tool) + set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.spark-update-tool) endif() -set_target_properties(Spark-Update-Tool PROPERTIES +set_target_properties(spark-update-tool PROPERTIES ${BUNDLE_ID_OPTION} MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} @@ -64,12 +64,12 @@ set_target_properties(Spark-Update-Tool PROPERTIES ) include(GNUInstallDirs) -install(TARGETS Spark-Update-Tool +install(TARGETS spark-update-tool BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) if(QT_VERSION_MAJOR EQUAL 6) - qt_finalize_executable(Spark-Update-Tool) + qt_finalize_executable(spark-update-tool) endif() diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..de17899 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +spark-update-tool (1.0.0-1) unstable; urgency=low + + * Initial release. + + -- momen Wed, 18 Jun 2025 00:00:00 +0000 \ No newline at end of file diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f11c82a --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..35ec34c --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: spark-update-tool +Section: utils +Priority: optional +Maintainer: momen +Build-Depends: debhelper (>= 9),qt6-base-dev +Standards-Version: 3.9.6 +Homepage: https://gitee.com/spark-store-project/Spark-Update-Tool + +Package: spark-update-tool +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A Qt-based application for managing tasks and reminders. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..163489e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: spark-update-tool +Source: https://gitee.com/spark-store-project/Spark-Update-Tool + +Files: * +Copyright: 2025, momen +License: GPL-3.0+ \ No newline at end of file diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..62266e3 --- /dev/null +++ b/debian/install @@ -0,0 +1,2 @@ +build/spark-update-tool /usr/bin/ +spark-update-tool.desktop /usr/share/applications diff --git a/debian/momodesk-mind.desktop b/debian/momodesk-mind.desktop new file mode 100644 index 0000000..2ef7139 --- /dev/null +++ b/debian/momodesk-mind.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=spark-update-tool +Comment=A Qt-based application for managing tasks and reminders +Exec=/usr/bin/spark-update-tool +Icon=/usr/share/spark-update-tool/img/momen.jpg +Terminal=false +Type=Application +Categories=Utility; \ No newline at end of file diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..263e9c4 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +case "$1" in + purge) + + rm -rf /usr/share/spark-update-tool + ;; +esac + +exit 0 \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1159ac4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..9f67427 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) \ No newline at end of file diff --git a/spark-update-tool.desktop b/spark-update-tool.desktop new file mode 100644 index 0000000..688ba0c --- /dev/null +++ b/spark-update-tool.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Spark Update Tool +Comment=A Qt-based application for managing and updating software +Exec=spark-update-tool +Icon=spark-update-tool +Terminal=false +Type=Application +Categories=Utility; diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f0aace0..1feb345 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -191,7 +191,6 @@ - PreferNoHinting