diff --git a/0001-removes-transparency.patch b/0001-removes-transparency.patch new file mode 100644 index 0000000000000000000000000000000000000000..617f6f6d3b4c85040f930b2c3459e800edeed7fa --- /dev/null +++ b/0001-removes-transparency.patch @@ -0,0 +1,53 @@ +From 25409b7ebcfaa987ba38a3c8f5481b58362b4df4 Mon Sep 17 00:00:00 2001 +From: myshow <296570182@qq.com> +Date: Wed, 16 Dec 2020 16:37:42 +0800 +Subject: [PATCH] removes-transparency + +--- + src/propertiesdialog.cpp | 2 +- + src/systemmonitor.cpp | 2 +- + widgets/mydialog.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/propertiesdialog.cpp b/src/propertiesdialog.cpp +index c0c4b88..90fcd60 100644 +--- a/src/propertiesdialog.cpp ++++ b/src/propertiesdialog.cpp +@@ -43,7 +43,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, pid_t processId) : QDialog(p + this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint/* | Qt::WindowCloseButtonHint*/| Qt::WindowStaysOnTopHint); + // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid + +- this->setAttribute(Qt::WA_TranslucentBackground); ++// this->setAttribute(Qt::WA_TranslucentBackground); + this->setAttribute(Qt::WA_Resized, false); + // this->setMaximumSize(480, 600); + // this->setMinimumWidth(320); +diff --git a/src/systemmonitor.cpp b/src/systemmonitor.cpp +index 0aa8055..ac1af9a 100644 +--- a/src/systemmonitor.cpp ++++ b/src/systemmonitor.cpp +@@ -61,7 +61,7 @@ SystemMonitor::SystemMonitor(QWidget *parent) + this->setObjectName("SystemMonitor"); + + this->setWindowFlags(Qt::FramelessWindowHint); //set for no windowhint +- this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 ++// this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 + this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + // QPainterPath path; + // auto rect = this->rect(); +diff --git a/widgets/mydialog.cpp b/widgets/mydialog.cpp +index a969f68..d940746 100644 +--- a/widgets/mydialog.cpp ++++ b/widgets/mydialog.cpp +@@ -39,7 +39,7 @@ MyDialog::MyDialog(const QString &title, const QString &message, QWidget *parent + this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint); + // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid + +- this->setAttribute(Qt::WA_TranslucentBackground); ++// this->setAttribute(Qt::WA_TranslucentBackground); + // this->setAttribute(Qt::WA_DeleteOnClose, false); + this->setAttribute(Qt::WA_Resized, false); + +-- +2.29.2.windows.2 + diff --git a/ukui-system-monitor-0.1.1.tar.gz b/ukui-system-monitor-0.1.1.tar.gz deleted file mode 100644 index a07686c6909a133d15bd35035dc2939e9ac5dc3a..0000000000000000000000000000000000000000 Binary files a/ukui-system-monitor-0.1.1.tar.gz and /dev/null differ diff --git a/ukui-system-monitor-1.0.1.tar.gz b/ukui-system-monitor-1.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cc6686ef309543dae5a4ab3154410113009e2b85 Binary files /dev/null and b/ukui-system-monitor-1.0.1.tar.gz differ diff --git a/ukui-system-monitor.spec b/ukui-system-monitor.spec index fd16c057788dc31330e3a0718b4e6c8ec6060b53..8a5dc16f3411fe12b63129e2741ae11d4e984689 100644 --- a/ukui-system-monitor.spec +++ b/ukui-system-monitor.spec @@ -1,9 +1,9 @@ %define debug_package %{nil} Name: ukui-system-monitor -Version: 0.1.1 -Release: 1 +Version: 1.0.1 +Release: 2 Summary: A simple system monitor written in QT -License: GPL-3+ GPL-2+ +License: GPL-3+ GPL-2+ URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz @@ -18,6 +18,8 @@ BuildRequires: libgtop2-devel BuildRequires: systemd-devel >= 209 BuildRequires: gsettings-qt-devel BuildRequires: qt5-qtx11extras-devel +BuildRequires: libpcap-devel +BuildRequires: kf5-kwindowsystem-devel #Requires: inotify-hookable #Requires: bsdutils @@ -28,38 +30,51 @@ Requires: lshw Requires: dmidecode Requires: kernel-tools Requires: pciutils +Requires: libpcap -#patch0: fix-monitor-default.patch +patch0: 0001-removes-transparency.patch %description A simple system monitor written in QT %prep %setup -q -#%%patch0 -p1 +%patch0 -p1 %build -#mkdir build && cd build -qmake-qt5 -make +export PATH=%{_qt5_bindir}:$PATH +mkdir qmake-build +pushd qmake-build +%{qmake_qt5} .. +%{make_build} +popd %install -rm -rf $RPM_BUILD_ROOT -#make INSTALL_ROOT=/root/rpmbuild/BUILDROOT install - -mkdir -p %{buildroot}/usr/bin/ -cp -rf %{_builddir}/%{name}-%{version}/ukui-system-monitor %{buildroot}/usr/bin/ukui-system-monitor +pushd qmake-build +%{make_install} INSTALL_ROOT=%{buildroot} +popd -mkdir -p %{buildroot}/usr/share/applications/ -cp -rf %{_builddir}/%{name}-%{version}/ukui-system-monitor.desktop %{buildroot}/usr/share/applications/ukui-system-monitor.desktop +%post +setcap "cap_net_admin,cap_net_raw+ep" /usr/bin/ukui-system-monitor +set -e +glib-compile-schemas /usr/share/glib-2.0/schemas/ %clean rm -rf $RPM_BUILD_ROOT %files +%doc debian/changelog %{_bindir}/ukui-system-monitor %{_datadir}/applications/ukui-system-monitor.desktop +%{_datadir}/icons/hicolor/ukui-system-monitor.png +%{_datadir}/glib-2.0/schemas/org.ukui.system-monitor.menu.gschema.xml %changelog +* Wed Dec 16 2020 lvhan - 1.0.1-2 +- removes transparency + +* Mon Oct 26 2020 douyan - 1.0.1-1 +- update to upstream version 1.0.0-1+1027 + * Thu Jul 9 2020 douyan - 0.1.1-1 -- Init package for openEuler \ No newline at end of file +- Init package for openEuler