add macros to control if detach the GTK package from the master package

This commit is contained in:
eaglegai 2022-06-25 17:09:23 +08:00
parent eb75c37dd5
commit a252df18d4

View File

@ -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 <lin.zhang@turbolinux.com.cn> - 0.94-3
* Sat Jun 25 2022 gaihuiying <eaglegai@163.com> - 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 <lin.zhang@turbolinux.com.cn> - 2:0.94-3
- add patch fix_for_printw_error.patch
* Wed Mar 3 2021 lin.zhang <lin.zhang@turbolinux.com.cn> - 0.94-2
* Wed Mar 3 2021 lin.zhang <lin.zhang@turbolinux.com.cn> - 2:0.94-2
- modify net-xmtr.desktop file for Xfce4 Traceroute
* Tue Jan 26 2021 SimpleUpdate Robot <tc@openeuler.org> - 0.94-1
* Tue Jan 26 2021 SimpleUpdate Robot <tc@openeuler.org> - 2:0.94-1
- Upgrade to version 0.94
* Mon Jul 20 2020 cuibaobao <cuibaobao1@huawei.com> - 2:0.93-9