From f1d9e67fc7a364269ee8b18f817498409052a5c3 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Sat, 25 Jun 2022 17:23:46 +0800 Subject: [PATCH] add macros to control if detach the GTK package from the master package --- mtr.spec | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/mtr.spec b/mtr.spec index f754fd7..a234bca 100644 --- a/mtr.spec +++ b/mtr.spec @@ -2,7 +2,7 @@ Name: mtr Version: 0.94 -Release: 3 +Release: 4 Epoch: 2 Summary: Ping and Traceroute Network Diagnostic Tool License: GPLv2 and BSD @@ -13,8 +13,10 @@ Source2: mtr-gtk-pkexec-wrapper.sh Patch0: fix_for_printw_error.patch BuildRequires: git autoconf automake libtool ncurses-devel gtk2-devel desktop-file-utils +%if %{?openEuler:1}0 Provides: %{name}-gtk = %{epoch}:%{version}-%{release} Obsoletes: %{name}-gtk < %{epoch}:%{version}-%{release} +%endif %description It is a network diagnostic tool,it has the "ping" and "traceroute" features. @@ -22,6 +24,18 @@ It prints information about the route and packets that sent from the host to the specified destination system.This tool can also print the response times and percentage for all network hops between the systems. +%if %{!?openEuler:1}0 +%package gtk +Summary: GTK+ interface for MTR +Group: Applications/Internet +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description gtk +MTR combines the functionality of the 'traceroute' and 'ping' programs +in a single network diagnostic tool. The mtr-gtk package provides the +GTK+ interface for MTR. +%endif + %package_help %prep @@ -54,10 +68,18 @@ make test %files %license COPYING BSDCOPYING %doc AUTHORS FORMATS +%if %{?openEuler:1}0 %caps(cap_net_raw=pe) %{_bindir}/xmtr* %{_sbindir}/%{name} %{_sbindir}/%{name}-packet +%else +%caps(cap_net_raw=pe) %{_sbindir}/%{name} +%caps(cap_net_raw=pe) %{_sbindir}/%{name}-packet + +%files gtk +%{_bindir}/xmtr* +%endif %{_datadir}/pixmaps/mtr_icon.xpm %{_datadir}/applications/net-x%{name}.desktop %{_datadir}/bash-completion/completions/%{name} @@ -68,13 +90,20 @@ make test %{_mandir}/man8/* %changelog -* Fri Mar 11 2022 lin.zhang - 0.94-3 +* Sat Jun 25 2022 gaihuiying - 2:0.94-4 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add macros to control if detach the GTK package from the master package + modify changelog to add epoch:2 + +* Fri Mar 11 2022 lin.zhang - 2:0.94-3 - add patch fix_for_printw_error.patch -* Wed Mar 3 2021 lin.zhang - 0.94-2 +* Wed Mar 3 2021 lin.zhang - 2:0.94-2 - modify net-xmtr.desktop file for Xfce4 Traceroute -* Tue Jan 26 2021 SimpleUpdate Robot - 0.94-1 +* Tue Jan 26 2021 SimpleUpdate Robot - 2:0.94-1 - Upgrade to version 0.94 * Mon Jul 20 2020 cuibaobao - 2:0.93-9 -- Gitee