deepin-system-monitor/deepin-system-monitor.spec

142 lines
4.4 KiB
RPMSpec
Raw Normal View History

2023-03-15 10:57:42 +08:00
%global debug_package %{nil}
2023-04-10 13:21:56 +08:00
%define pkgrelease 1
%if 0%{?openeuler}
%define specrelease %{pkgrelease}
%else
## allow specrelease to have configurable %%{?dist} tag in other distribution
%define specrelease %{pkgrelease}%{?dist}
%endif
2020-07-14 10:55:31 +08:00
Name: deepin-system-monitor
2023-04-10 13:21:56 +08:00
Version: 5.8.28
Release: %{specrelease}
2020-07-14 10:55:31 +08:00
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
Patch0: 0001-procps-ng-update-4.0.0.patch
2023-03-15 10:57:42 +08:00
Patch1: 0002-feat-fix-strip.patch
2023-04-10 13:21:56 +08:00
#Patch2: 0003-Fix-incomplete-display-of-the-system-monitor-when-th.patch
2021-07-07 16:05:21 +08:00
BuildRequires: qt5-devel
BuildRequires: cmake
BuildRequires: dtkwidget-devel
BuildRequires: dtkcore-devel
BuildRequires: pkgconfig(dtkgui)
# BuildRequires: pkgconfig(dtkwm)
2020-07-14 10:55:31 +08:00
BuildRequires: procps-ng-devel
2020-07-14 10:55:31 +08:00
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xtst)
BuildRequires: xcb-util-wm-devel
# BuildRequires: pkgconfig(Qt5DBus)
# BuildRequires: pkgconfig(Qt5Gui)
# BuildRequires: pkgconfig(Qt5Network)
# BuildRequires: pkgconfig(Qt5Widgets)
# BuildRequires: pkgconfig(Qt5X11Extras)
# BuildRequires: qt5-linguist
2020-07-14 10:55:31 +08:00
BuildRequires: libpcap-devel
BuildRequires: libcap-devel
# BuildRequires: ncurses-devel
2020-07-14 10:55:31 +08:00
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: deepin-gettext-tools
2022-02-08 14:36:13 +08:00
BuildRequires: qt5-qtbase-private-devel
# BuildRequires: dtkwm-devel
# BuildRequires: qt5-qtmultimedia-devel
# BuildRequires: dtkcore-devel >= 5.1
BuildRequires: libicu-devel
BuildRequires: libnl3-devel
BuildRequires: systemd-devel
# BuildRequires: pkgconfig(libnl-route-3)
#Requires: hicolor-icon-theme
2020-07-14 10:55:31 +08:00
Recommends: deepin-manual
%description
%{summary}.
%prep
%autosetup -p1
# %setup -q
####sed -i 's|lrelease|lrelease-qt5|' translations/translate_generation.sh
# %patch0 -p1
2020-07-14 10:55:31 +08:00
%build
2021-07-07 16:05:21 +08:00
export PATH=%{_qt5_bindir}:$PATH
sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt")
mkdir build && pushd build
%cmake -DCMAKE_BUILD_TYPE=Release ../ -DAPP_VERSION=%{version} -DVERSION=%{version}
%make_build
popd
2020-07-14 10:55:31 +08:00
%install
2021-07-07 16:05:21 +08:00
%make_install -C build INSTALL_ROOT="%buildroot"
2020-07-14 10:55:31 +08:00
# %check
# desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
#appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml
%post
if command -v setcap > /dev/null; then
if setcap cap_net_raw,cap_dac_read_search,cap_sys_ptrace+ep /usr/bin/deepin-system-monitor;then
chmod u-s /usr/bin/deepin-system-monitor
else
echo "Setcap failed, falling back to setuid"
chmod u+s /usr/bin/deepin-system-monitor
fi
else
echo "Setcap is not installed, falling back to setuid"
chmod u+s /usr/bin/deepin-system-monitor
fi
2020-07-14 10:55:31 +08:00
%files
%doc README.md
%license LICENSE
%caps(cap_kill,cap_net_raw,cap_dac_read_search,cap_sys_ptrace=+ep) %{_bindir}/%{name}
2021-07-07 16:05:21 +08:00
%{_bindir}/%{name}
2020-07-14 10:55:31 +08:00
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
2021-07-07 16:05:21 +08:00
%{_datadir}/%{name}/translations/*.qm
2020-07-14 10:55:31 +08:00
%{_datadir}/polkit-1/actions/com.deepin.pkexec.deepin-system-monitor.policy
%{_datadir}/deepin-manual/manual-assets/application/deepin-system-monitor/system-monitor/*
2020-07-14 10:55:31 +08:00
%changelog
2023-04-10 13:21:56 +08:00
* Mon Apr 10 2023 liweiganga <liweiganga@uniontech.com> - 5.8.28-1
- update: update to 5.8.28
* Thu Apr 06 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.8.11-6
- Fix incomplete display of the system monitor when the resolution is 1020 * 768
2023-03-15 10:57:42 +08:00
* Wed Mar 15 2023 liweiganga <liweiganga@uniontech.com> - 5.8.11-5
- feat: fix strip
* Fri Feb 10 2023 liweiganga <liweiganga@uniontech.com> - 5.8.11-4
- feat: update changes due to procps-ng upgrade
* Wed Dec 21 2022 liweigang <liweiganga@uniontech.com> - 5.8.11-3
- enable debuginfo for fix strip
* Fri Nov 11 2022 liweigang <liweiganga@uniontech.com> - 5.8.11-2
- feat: procps-ng update 4.0.0
* Tue Jul 19 2022 konglidong <konglidong@uniontech.com> - 5.8.11-1
- update to 5.8.11
2022-02-08 14:36:13 +08:00
* Tue Feb 08 2022 liweigang <liweiganga@uniontech.com> - 5.6.11.13-3
- fix build error
2021-07-29 10:20:14 +08:00
* Thu Jul 29 2021 weidong <weidong@uniontech.com> - 5.6.11.13-2
- Fix gcc10.3 compilation deepin-system-monitor failed
2021-07-07 16:05:21 +08:00
* Wed Jul 07 2021 weidong <weidong@uniontech.com> - 5.6.11.13-1
- Update to 5.6.11.13
2020-07-30 16:40:04 +08:00
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.6.1-1
- Package init