From f70588f4471716b06ad76a3351a6ea0defd0955b Mon Sep 17 00:00:00 2001 From: keke <243768648@qq.com> Date: Fri, 9 Sep 2022 13:18:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8dpkg-buildpackage?= =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ccc-app-manager.pro | 12 ++++++++- debian/changelog | 5 ++++ debian/compat | 1 + debian/control | 14 ++++++++++ debian/copyright | 61 ++++++++++++++++++++++++++++++++++++++++++++ debian/rules | 17 ++++++++++++ dpkg-buildpackage.sh | 19 ++++++++++++++ src/main.cpp | 2 +- start.sh | 3 +++ 9 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100755 dpkg-buildpackage.sh create mode 100755 start.sh diff --git a/ccc-app-manager.pro b/ccc-app-manager.pro index 573f569..55c643f 100644 --- a/ccc-app-manager.pro +++ b/ccc-app-manager.pro @@ -43,6 +43,13 @@ HEADERS += \ src/dlg/pkgdownloaddlg.h \ src/pkgmonitor/pkgmonitor.h +isEmpty(VERSION) { + VERSION = 0.0.1 +} +DEFINES += QMAKE_TARGET=\\\"$$TARGET\\\" QMAKE_VERSION=\\\"$$VERSION\\\" + +message(VERSION: $$VERSION) + # Default rules for deployment. target.path = /opt/apps/com.github.ccc-app-manager/files @@ -58,7 +65,10 @@ usr_desktop.path = /usr/share/applications pkg.files = ./pkg/* pkg.path = /opt/apps/com.github.ccc-app-manager/files/pkg -INSTALLS += target icon opt_desktop usr_desktop pkg +start.files = ./start.sh +start.path = /opt/apps/com.github.ccc-app-manager/files + +INSTALLS += target icon opt_desktop usr_desktop pkg start RESOURCES += \ resources/icons.qrc diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..befb82c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +com.github.ccc-app-manager (0.0.7) unstable; urgency=medium + + * Initial release (Closes: #nnnn) + + -- keke Tue, 9 Sep 2022 10:42:29 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control index 1fc8266..58f7885 100644 --- a/debian/control +++ b/debian/control @@ -1,3 +1,17 @@ +Source: com.github.ccc-app-manager +Section: utils +Priority: optional +Maintainer: keke <243768648@qq.com> +Depends: libc6 (>= 2.28), libgcc1 (>= 1:3.4), libgl1, libqt5core5a (>= 5.11.0~rc1), libqt5gui5 (>= 5.8.0), libqt5network5 (>= 5.0.2), libqt5widgets5 (>= 5.0.2), libdtkcore5 (>= 5.4), libdtkgui5 (>= 5.4), libdtkwidget5 (>= 5.4) +Build-Depends: debhelper (>= 11), + libdtkwidget-dev, + libdtkgui-dev, + qtbase5-dev, + zlib1g-dev, + libgsettings-qt-dev +Standards-Version: 0.0.4 +Homepage: https://gitee.com/ct243768648/ccc-app-manager + Package: com.github.ccc-app-manager Priority: optional Section: unknown diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d4f1cc1 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,61 @@ +This package was debianized by Laurent Bigonville on +Sun, 09 Dec 2007 21:37:08 +0100 + +It was downloaded from: + + +Upstream Authors: + + John (J5) Palmieri + Ray Strode + Marcel Holtmann + +Copyright: + + Copyright © 2003, 2004, 2005, 2006 Red Hat Inc. + Copyright © 2003 David Zeuthen + Copyright © 2004 Rob Taylor + Copyright © 2005, 2006 Collabora Ltd. + +License (except dfeet/_introspect_parser.py): + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +On Debian systems, the complete text of the GPL can be found in +/usr/share/common-licenses/GPL. + +License (dfeet/_introspect_parser.py): + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +The Debian packaging is © 2007-2009, Laurent Bigonville and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7a4201a --- /dev/null +++ b/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export QT_SELECT=5 +include /usr/share/dpkg/default.mk + +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) + +%: + dh $@ --parallel + +override_dh_auto_configure: + dh_auto_configure -- VERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) DEFINES+="VERSION=$(DEB_VERSION_UPSTREAM)" + + +#override_dh_auto_build: + #qmake ccc-app-manager.pro VERSION=$(DEB_VERSION_UPSTREAM) + #make -j$(nproc) \ No newline at end of file diff --git a/dpkg-buildpackage.sh b/dpkg-buildpackage.sh new file mode 100755 index 0000000..ddecdce --- /dev/null +++ b/dpkg-buildpackage.sh @@ -0,0 +1,19 @@ +#!/bin/bash +read -p "version: " version + +mkdir -p dpkg-build-tmp +cd dpkg-build-tmp +cp -rf ../* . + +cat << EOF > debian/changelog +com.github.ccc-app-manager ($version) unstable; urgency=medium + + * Initial release (Closes: #nnnn) + + -- keke Tue, 9 Sep 2022 10:42:29 +0800 +EOF + +dpkg-buildpackage -us -uc + +cd .. +rm -rf dpkg-build-tmp \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index d5fe77f..300fe23 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) a.setAttribute(Qt::AA_UseHighDpiPixmaps); a.setOrganizationName("ccc"); a.setApplicationName("ccc-app-manager"); - a.setApplicationVersion(DApplication::buildVersion("0.0.6-1")); //change version here + a.setApplicationVersion(DApplication::buildVersion(QMAKE_VERSION)); //change version here a.loadTranslator(); a.setApplicationDisplayName(QObject::tr("App Manager")); a.setStyle("chameleon"); diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..bb33b10 --- /dev/null +++ b/start.sh @@ -0,0 +1,3 @@ +#!/bin/bash +XDG_CURRENT_DESKTOP=Deepin +/opt/apps/com.github.ccc-app-manager/files/ccc-app-manager -platformtheme deepin "$@" -- Gitee