diff options
author | hayao | 2020-06-18 19:53:41 +0900 |
---|---|---|
committer | hayao | 2020-06-18 19:53:41 +0900 |
commit | 50a1d2dcfb71b142a9ea4feb097829df3996457b (patch) | |
tree | ddf302e97c102d7f0050b166b016eb0c8ea08913 | |
download | aur-50a1d2dcfb71b142a9ea4feb097829df3996457b.tar.gz |
[add] : Initial commit.
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | deepin-system-monitor-qt5.15.patch | 144 | ||||
-rw-r--r-- | deepin-system-monitor.install | 7 | ||||
-rw-r--r-- | qt-5.14.patch | 106 |
5 files changed, 341 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..910a594e4e53 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = deepin-system-monitor-git + pkgdesc = A more user-friendly system monitor + pkgver = 5.6.5.r0.g2f0ce74 + pkgrel = 1 + url = https://github.com/linuxdeepin/deepin-system-monitor + install = deepin-system-monitor.install + arch = x86_64 + groups = deepin + license = GPL3 + makedepends = deepin-gettext-tools + makedepends = qt5-tools + depends = deepin-qt5integration + depends = dtkwm + depends = procps-ng + depends = nethogs + depends = libcap + source = git+https://github.com/linuxdeepin/deepin-system-monitor + source = qt-5.14.patch + source = deepin-system-monitor-qt5.15.patch + sha512sums = SKIP + sha512sums = 423e6b528ac0e63986aedbac3f2065b985945f38a54fe3e818b841154b846d67379cac470c8e22c06d449a79cf2e7f29a007358adf4f86918d1078b789e1e612 + sha512sums = 45f9938885c6e29abf61174db3bc5654646baa7a8ec067ee4e048511eb62ae79996976c02d9275e8fdf1a7321dd0219b58ae54d8d370c5acf8346dd77959c608 + +pkgname = deepin-system-monitor-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..41036434c1a3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer : Yamada Hayao <hayao@fascode.net> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Josip Ponjavic <josipponjavic at gmail dot com> +# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com> + +pkgname=deepin-system-monitor-git +pkgver=5.6.5.r0.g2f0ce74 +pkgrel=1 +pkgdesc='A more user-friendly system monitor' +arch=('x86_64') +url="https://github.com/linuxdeepin/deepin-system-monitor" +license=('GPL3') +depends=('deepin-qt5integration' 'dtkwm' 'procps-ng' 'nethogs' 'libcap') +makedepends=('deepin-gettext-tools' 'qt5-tools') +groups=('deepin') +install=deepin-system-monitor.install +source=("git+https://github.com/linuxdeepin/deepin-system-monitor" + qt-5.14.patch + deepin-system-monitor-qt5.15.patch) +sha512sums=('SKIP' + '423e6b528ac0e63986aedbac3f2065b985945f38a54fe3e818b841154b846d67379cac470c8e22c06d449a79cf2e7f29a007358adf4f86918d1078b789e1e612' + '45f9938885c6e29abf61174db3bc5654646baa7a8ec067ee4e048511eb62ae79996976c02d9275e8fdf1a7321dd0219b58ae54d8d370c5acf8346dd77959c608') + + +pkgver() { + cd "deepin-system-monitor" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd deepin-system-monitor + patch -p1 -i ../qt-5.14.patch + patch -p1 -i ../deepin-system-monitor-qt5.15.patch # Fix build with Qt 5.15 + sed -i '/<QPixmap>/a #include <QUrl>' src/process/stats_collector.cpp + + rm -r 3rdparty + sed -i 's|error("Build nethogs static library failed.")||' deepin-system-monitor.pro + + sed -i 's/nethogsmonitor_loop(&onNethogsUpdate);/nethogsmonitor_loop(\&onNethogsUpdate, NULL, 1000);/' src/network_traffic_filter.cpp + +# Workaround build failure with GCC 10 + sed -e 's|print_err|print_err_system|g' -i src/process/system_stat.cpp + sed -e 's|print_err|print_err_process|g' -i src/process/process_stat.cpp + sed -e 's|print_err|print_err_desktop|g' -i src/process/desktop_entry_stat.cpp +} + +build() { + cd deepin-system-monitor + qmake-qt5 PREFIX=/usr + make +} + +package() { + cd deepin-system-monitor + make INSTALL_ROOT="$pkgdir" install +} diff --git a/deepin-system-monitor-qt5.15.patch b/deepin-system-monitor-qt5.15.patch new file mode 100644 index 000000000000..825873a00a5b --- /dev/null +++ b/deepin-system-monitor-qt5.15.patch @@ -0,0 +1,144 @@ +diff --git a/src/compact_cpu_monitor.cpp b/src/compact_cpu_monitor.cpp +index c703ed8..2e04db9 100644 +--- a/src/compact_cpu_monitor.cpp ++++ b/src/compact_cpu_monitor.cpp +@@ -29,6 +29,7 @@ + #include <QApplication> + #include <QDebug> + #include <QPainter> ++#include <QPainterPath> + #include <QtMath> + + #include "compact_cpu_monitor.h" +diff --git a/src/compact_disk_monitor.h b/src/compact_disk_monitor.h +index 54868a9..57a9fa6 100644 +--- a/src/compact_disk_monitor.h ++++ b/src/compact_disk_monitor.h +@@ -26,6 +26,7 @@ + + #include <DApplicationHelper> + #include <QWidget> ++#include <QPainterPath> + + DWIDGET_USE_NAMESPACE + +diff --git a/src/compact_memory_monitor.cpp b/src/compact_memory_monitor.cpp +index 80e5088..e5b9bf7 100644 +--- a/src/compact_memory_monitor.cpp ++++ b/src/compact_memory_monitor.cpp +@@ -28,6 +28,7 @@ + #include <DStyle> + #include <QDebug> + #include <QPainter> ++#include <QPainterPath> + #include <QtMath> + + #include "compact_memory_monitor.h" +diff --git a/src/compact_network_monitor.h b/src/compact_network_monitor.h +index c6f80d0..18830e8 100644 +--- a/src/compact_network_monitor.h ++++ b/src/compact_network_monitor.h +@@ -26,6 +26,7 @@ + + #include <DApplicationHelper> + #include <QWidget> ++#include <QPainterPath> + + DWIDGET_USE_NAMESPACE + +diff --git a/src/cpu_monitor.h b/src/cpu_monitor.h +index fccdb9d..dd0b05a 100644 +--- a/src/cpu_monitor.h ++++ b/src/cpu_monitor.h +@@ -32,6 +32,7 @@ + #include <QVBoxLayout> + #include <QWidget> + #include <QPropertyAnimation> ++#include <QPainterPath> + + DWIDGET_USE_NAMESPACE + +diff --git a/src/disk_monitor.h b/src/disk_monitor.h +index 05ec296..b10a225 100644 +--- a/src/disk_monitor.h ++++ b/src/disk_monitor.h +@@ -26,6 +26,7 @@ + + #include <DApplicationHelper> + #include <QWidget> ++#include <QPainterPath> + + DWIDGET_USE_NAMESPACE + +diff --git a/src/gui/base_header_view.cpp b/src/gui/base_header_view.cpp +index bfaebda..bab7b22 100644 +--- a/src/gui/base_header_view.cpp ++++ b/src/gui/base_header_view.cpp +@@ -7,6 +7,7 @@ + #include <QDebug> + #include <QPaintEvent> + #include <QPainter> ++#include <QPainterPath> + #include <QtMath> + + #include "base_header_view.h" +diff --git a/src/gui/process_page_widget.cpp b/src/gui/process_page_widget.cpp +index 8bce954..a951974 100644 +--- a/src/gui/process_page_widget.cpp ++++ b/src/gui/process_page_widget.cpp +@@ -40,6 +40,7 @@ + #include <QMessageBox> + #include <QStyleFactory> + #include <QVBoxLayout> ++#include <QPainterPath> + + #include "constant.h" + #include "kill_process_confirm_dialog.h" +diff --git a/src/gui/system_service_page_widget.cpp b/src/gui/system_service_page_widget.cpp +index af27fde..cf861d7 100644 +--- a/src/gui/system_service_page_widget.cpp ++++ b/src/gui/system_service_page_widget.cpp +@@ -3,6 +3,7 @@ + #include <DStyle> + #include <DStyleHelper> + #include <QHBoxLayout> ++#include <QPainterPath> + + #include "main_window.h" + #include "system_service_page_widget.h" +diff --git a/src/memory_monitor.cpp b/src/memory_monitor.cpp +index 849f337..e90a01a 100644 +--- a/src/memory_monitor.cpp ++++ b/src/memory_monitor.cpp +@@ -28,6 +28,7 @@ + #include <DStyle> + #include <QDebug> + #include <QPainter> ++#include <QPainterPath> + #include <QtMath> + #include <QPropertyAnimation> + +diff --git a/src/network_monitor.h b/src/network_monitor.h +index f14d329..3049ce2 100644 +--- a/src/network_monitor.h ++++ b/src/network_monitor.h +@@ -27,6 +27,7 @@ + #include <DApplicationHelper> + #include <QIcon> + #include <QWidget> ++#include <QPainterPath> + + DWIDGET_USE_NAMESPACE + +diff --git a/src/utils.cpp b/src/utils.cpp +index 054025e..f9646f5 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -39,6 +39,7 @@ + #include <QImageReader> + #include <QLayout> + #include <QPainter> ++#include <QPainterPath> + #include <QPixmap> + #include <QStandardPaths> + #include <QString> diff --git a/deepin-system-monitor.install b/deepin-system-monitor.install new file mode 100644 index 000000000000..9cfc87fc7fa0 --- /dev/null +++ b/deepin-system-monitor.install @@ -0,0 +1,7 @@ +post_install() { + setcap cap_kill,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+ep usr/bin/deepin-system-monitor +} + +post_upgrade() { + post_install +} diff --git a/qt-5.14.patch b/qt-5.14.patch new file mode 100644 index 000000000000..4835fb95a196 --- /dev/null +++ b/qt-5.14.patch @@ -0,0 +1,106 @@ +diff --git a/deepin-system-monitor.pro b/deepin-system-monitor.pro +index 4b41229..c30c6e9 100644 +--- a/deepin-system-monitor.pro ++++ b/deepin-system-monitor.pro +@@ -39,7 +39,6 @@ HEADERS += src/utils.h \ + src/compact_network_monitor.h \ + src/compact_disk_monitor.h \ + src/network_traffic_filter.h \ +- src/hashqstring.h \ + src/find_window_title.h \ + src/smooth_curve_generator.h \ + src/interactive_kill.h \ +diff --git a/src/gui/process_table_view.cpp b/src/gui/process_table_view.cpp +index 3a18329..ae0f4b5 100644 +--- a/src/gui/process_table_view.cpp ++++ b/src/gui/process_table_view.cpp +@@ -20,6 +20,7 @@ + #include <QMessageBox> + #include <QProcess> + #include <QTimer> ++#include <QKeyEvent> + + #include "kill_process_confirm_dialog.h" + #include "main_window.h" +diff --git a/src/gui/system_service_table_view.cpp b/src/gui/system_service_table_view.cpp +index 15d18b4..d1b1f8c 100644 +--- a/src/gui/system_service_table_view.cpp ++++ b/src/gui/system_service_table_view.cpp +@@ -10,6 +10,7 @@ + #include <QFutureWatcher> + #include <QScrollBar> + #include <QtConcurrent> ++#include <QKeyEvent> + + #include "common/error_context.h" + #include "main_window.h" +diff --git a/src/hashqstring.h b/src/hashqstring.h +deleted file mode 100644 +index 20522b3..0000000 +--- a/src/hashqstring.h ++++ /dev/null +@@ -1,40 +0,0 @@ +-/* -*- Mode: C++; indent-tabs-mode: nil; tab-width: 4 -*- +- * -*- coding: utf-8 -*- +- * +- * Copyright (C) 2011 ~ 2018 Deepin, Inc. +- * 2011 ~ 2018 Wang Yong +- * +- * Author: Wang Yong <wangyong@deepin.com> +- * Maintainer: Wang Yong <wangyong@deepin.com> +- * +- * 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 3 of the License, or +- * 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, see <http://www.gnu.org/licenses/>. +- */ +- +-#ifndef HASHQSTRING_H +-#define HASHQSTRING_H +- +-#include <QString> +-#include <string> +- +-namespace std { +- template<> struct hash<QString> +- { +- size_t operator()(const QString& k) const +- { +- return hash<string>()(k.toStdString()); +- } +- }; +-} +- +-#endif // HASHQSTRING_H +diff --git a/src/utils.cpp b/src/utils.cpp +index 054025e..4d19745 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -49,7 +49,6 @@ + + #include <X11/extensions/shape.h> + +-#include "hashqstring.h" + #include "utils.h" + + DCORE_USE_NAMESPACE +diff --git a/src/utils.h b/src/utils.h +index 747b445..7248711 100644 +--- a/src/utils.h ++++ b/src/utils.h +@@ -32,6 +32,5 @@ + #include <QString> + #include <unordered_set> + #include "find_window_title.h" +-#include "hashqstring.h" + #include <QDebug> + + #include <QVariant> |