diff --git a/.gitignore b/.gitignore index 1565743..8d54eb2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /deepin-system-monitor-1.4.8.tar.gz /deepin-system-monitor-1.4.8.1.tar.gz /deepin-system-monitor-5.0.0.tar.gz +/deepin-system-monitor-5.8.0.1.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..2ef56d9 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,18 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +specfile_path: rpm/deepin-system-monitor.spec + +# add or remove files that should be synced +synced_files: + - rpm/deepin-system-monitor.spec + - .packit.yaml + +upstream_ref: 5.8.0.1 +upstream_package_name: deepin-system-monitor +# downstream (Fedora) RPM package name +downstream_package_name: deepin-system-monitor + +actions: + fix-spec-file: | + bash -c "sed -i -r \"s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/deepin-system-monitor.spec" diff --git a/0001-Fix-build-with-Qt-5.14.patch b/0001-Fix-build-with-Qt-5.14.patch deleted file mode 100644 index 407771e..0000000 --- a/0001-Fix-build-with-Qt-5.14.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ac023314c5960e4010547c119d98d74dee8524c6 Mon Sep 17 00:00:00 2001 -From: Robin Lee -Date: Thu, 6 Aug 2020 22:19:27 +0800 -Subject: [PATCH] Fix build with Qt 5.14 - ---- - src/utils.cpp | 1 - - src/utils.h | 4 +++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/utils.cpp b/src/utils.cpp -index 5f47fe9..51c074a 100644 ---- a/src/utils.cpp -+++ b/src/utils.cpp -@@ -21,7 +21,6 @@ - * along with this program. If not, see . - */ - --#include "hashqstring.h" - #include "utils.h" - #include - #include -diff --git a/src/utils.h b/src/utils.h -index c76ec2c..08081e0 100644 ---- a/src/utils.h -+++ b/src/utils.h -@@ -22,8 +22,10 @@ - */ - #ifndef UTILS_H - #define UTILS_H -- -+#include -+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) - #include "hashqstring.h" -+#endif - #include "find_window_title.h" - #include - #include --- -2.26.2 - diff --git a/0001-fix-remove-multidefs.patch b/0001-fix-remove-multidefs.patch new file mode 100644 index 0000000..dff71a7 --- /dev/null +++ b/0001-fix-remove-multidefs.patch @@ -0,0 +1,71 @@ +From e04c3d044060069aa4be645a64b09194c9efe0c6 Mon Sep 17 00:00:00 2001 +From: Robin Lee +Date: Sun, 1 Nov 2020 17:27:31 +0800 +Subject: [PATCH 1/2] fix: remove multidefs + +remove multidefs + +Log: +Signed-off-by: Robin Lee +--- + src/process/desktop_entry_stat.cpp | 5 +++-- + src/process/process_stat.cpp | 5 +++-- + src/process/system_stat.cpp | 4 ++-- + 3 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/src/process/desktop_entry_stat.cpp b/src/process/desktop_entry_stat.cpp +index 4281e07..bdf1136 100644 +--- a/src/process/desktop_entry_stat.cpp ++++ b/src/process/desktop_entry_stat.cpp +@@ -34,10 +34,11 @@ DCORE_USE_NAMESPACE + + static const int kUpdateInterval = 1000 * 300; // 5 minutes interval + +-auto print_err = [](decltype(errno) e, const QString &msg) ++// error debug output utility ++static void print_err(decltype(errno) e, const QString &msg) + { + qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg; +-}; ++} + + DesktopEntryStat::DesktopEntryStat(QObject *parent) : QObject(parent) + { +diff --git a/src/process/process_stat.cpp b/src/process/process_stat.cpp +index 58b7854..92be119 100644 +--- a/src/process/process_stat.cpp ++++ b/src/process/process_stat.cpp +@@ -40,10 +40,11 @@ + #define PROC_FD_NAME_PATH "/proc/%u/fd/%s" + #define PROC_SCHEDSTAT_PATH "/proc/%u/schedstat" + +-auto print_err = [](decltype(errno) e, const QString &msg) ++// util to pring error message ++static void print_err(decltype(errno) e, const QString &msg) + { + qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg; +-}; ++} + + // ref: sysstat#common.c#get_kb_shift + static inline unsigned int get_kb_shift(void) +diff --git a/src/process/system_stat.cpp b/src/process/system_stat.cpp +index fe8d304..47d6633 100644 +--- a/src/process/system_stat.cpp ++++ b/src/process/system_stat.cpp +@@ -48,10 +48,10 @@ + + #define MAX_NAME_LEN 128 + +-auto print_err = [](decltype(errno) e, const QString &msg) ++static void print_err(decltype(errno) e, const QString &msg) + { + qDebug() << QString("Error: [%1] %2, ").arg(e).arg(strerror(e)) << msg; +-}; ++} + + bool SystemStat::readUpTime(qulonglong &uptime) + { +-- +2.26.2 + diff --git a/0002-feat-Initial-packit-setup.patch b/0002-feat-Initial-packit-setup.patch new file mode 100644 index 0000000..dd53bc1 --- /dev/null +++ b/0002-feat-Initial-packit-setup.patch @@ -0,0 +1,63 @@ +From c5164faa468d829303733d16dabed039dba2cab7 Mon Sep 17 00:00:00 2001 +From: Robin Lee +Date: Sun, 1 Nov 2020 15:22:46 +0800 +Subject: [PATCH 2/2] feat: Initial packit setup + +This commit contains the specfile for building the official package for Fedora +with a Packit setup. + +Ultimately, a unified specfile is targeted for Fedora and any other rpm-based +distributions, e.g. openEuler. + +And Packit(https://packit.dev/) is a tool for maintaining specfile within +upstream source. It requires a simple config file(.packit.yaml). + +Log: + +Signed-off-by: Robin Lee +--- + rpm/deepin-system-monitor-appdata.xml | 32 +++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + create mode 100644 rpm/deepin-system-monitor-appdata.xml + +diff --git a/rpm/deepin-system-monitor-appdata.xml b/rpm/deepin-system-monitor-appdata.xml +new file mode 100644 +index 0000000..a905e1f +--- /dev/null ++++ b/rpm/deepin-system-monitor-appdata.xml +@@ -0,0 +1,32 @@ ++ ++ ++ ++ deepin-system-monitor.desktop ++ CC0-1.0 ++ Deepin System Monitor ++ 深度系统监视器 ++ 深度系统监视器 ++ Deepin System Monitor is Deepin Desktop Environment system monitor ++ 深度系统监视器是一个免费开源的跨平台系统性能监视工具 ++ 深度系统监视器是一个免费开源的跨平台系统性能监视工具 ++ ++

++ Deepin System Monitor is a free and open source cross-platform system monitor tool. ++

++

++ 深度系统监视器是一个免费开源的跨平台系统性能监视工具。 ++

++
++ https://github.com/linuxdeepin/deepin-system-monitor/ ++ https://github.com/linuxdeepin/deepin-system-monitor/issues/ ++ ++ ++ ++ GPL-3.0 ++ Linux Deepin ++ ++ http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/phpCsoD79.png ++ http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/php0vAbT7.png ++ http://api.lastore.deepin.org/static/deepin-system-monitor/meta/screenshots/zh_CN/phpSZvurm.png ++ ++
+-- +2.26.2 + diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..0b7be24 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.18.0. diff --git a/deepin-system-monitor.spec b/deepin-system-monitor.spec index 3f6726e..43f23d0 100644 --- a/deepin-system-monitor.spec +++ b/deepin-system-monitor.spec @@ -1,17 +1,30 @@ Name: deepin-system-monitor -Version: 5.0.0 -Release: 5%{?dist} +Version: 5.8.0.1 +Release: 1%{?dist} Summary: A more user-friendly system monitor License: GPLv3 URL: https://github.com/linuxdeepin/deepin-system-monitor Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{name}-appdata.xml -Patch0: 0001-Fix-build-with-Qt-5.14.patch + +# PATCHES FROM SOURCE GIT: + +# fix: remove multidefs +# Author: Robin Lee +Patch0001: 0001-fix-remove-multidefs.patch + +# feat: Initial packit setup +# Author: Robin Lee +Patch0002: 0002-feat-Initial-packit-setup.patch + + +BuildRequires: cmake BuildRequires: pkgconfig(dtkwidget) >= 2.0 BuildRequires: pkgconfig(dtkwm) >= 2.0 BuildRequires: pkgconfig(libprocps) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-util) +BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xtst) @@ -20,12 +33,15 @@ BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5X11Extras) +BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: qt5-linguist BuildRequires: libpcap-devel BuildRequires: libcap-devel BuildRequires: ncurses-devel +BuildRequires: libicu-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib +BuildRequires: deepin-gettext-tools Requires: hicolor-icon-theme Recommends: deepin-manual @@ -33,16 +49,14 @@ Recommends: deepin-manual %{summary}. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build -export PATH=%{_qt5_bindir}:$PATH -%qmake_qt5 PREFIX=%{_prefix} -%make_build +%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo +%cmake_build %install -%make_install INSTALL_ROOT=%{buildroot} +%cmake_install install -Dm644 %SOURCE1 %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml %check @@ -52,13 +66,18 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata. %files %doc README.md %license LICENSE -%caps(cap_kill,cap_net_raw,cap_dac_read_search,cap_sys_ptrace=+ep) %{_bindir}/%{name} +# caps sync with debian/postinst +%caps(cap_net_raw,cap_dac_read_search,cap_sys_ptrace+ep) %{_bindir}/%{name} %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/%{name}/ +%{_datadir}/polkit-1/actions/com.deepin.*.policy %changelog +* Thu Nov 12 2020 Robin Lee - 5.8.0.1-1 +- new upstream release: 5.8.0.1 + * Wed Sep 2 2020 Robin Lee - 5.0.0-5 - Rebuild for libprocps diff --git a/sources b/sources index 8db3dc7..a9ac2ed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (deepin-system-monitor-5.0.0.tar.gz) = 86694da7a50b703715a07bf4e7b8eb92f2cef1b0f9d854e415a2593bae4c6afa33f3283e89ce819f67ff05fcc5171041fb5e060756a1d50be8679ea16e2d9beb +SHA512 (deepin-system-monitor-5.8.0.1.tar.gz) = 0057173e630f4727da09d00c720542407df8f76cc725af3361a5b0b1646f98a53a5d3e3d7957f050057d22eb6daebfbaab03be0d2a6d7c78b3d9da9da95f9bfe