From 565e4097a21b77c994d6bd3d36f0f81455049198 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Aug 28 2007 18:09:50 +0000 Subject: - Buildrequire %%{_includedir}/pcap.h instead of conditionals - Patch to display top scale in bytes when measuring in bytes --- diff --git a/iftop-0.17-bandwidth.patch b/iftop-0.17-bandwidth.patch new file mode 100644 index 0000000..d1bba18 --- /dev/null +++ b/iftop-0.17-bandwidth.patch @@ -0,0 +1,14 @@ +Backported patch from Marcin Kryczek for iftop >= 0.17, +to display top scale in bytes when measuring in bytes. + +--- iftop-0.17/ui.c 2005-10-26 22:12:33.000000000 +0200 ++++ iftop-0.17/ui.c.bandwidth 2006-06-22 21:36:16.000000000 +0200 +@@ -263,7 +263,7 @@ + char s[40], *p; + int x; + /* This 1024 vs 1000 stuff is just plain evil */ +- readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, 0); ++ readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, options.bandwidth_in_bytes); + p = s + strspn(s, " "); + x = get_bar_length(i * 8); + mvaddch(*y + 1, x, ACS_BTEE); diff --git a/iftop-0.17-man-typos.patch b/iftop-0.17-man-typos.patch new file mode 100644 index 0000000..01d8215 --- /dev/null +++ b/iftop-0.17-man-typos.patch @@ -0,0 +1,23 @@ +Patch by Robert Scheck for iftop >= 0.17, which +corrects some typos within the man page. + +--- iftop-0.17/iftop.8 2005-12-25 12:50:21.000000000 +0100 ++++ iftop-0.17/iftop.8.man-typos 2007-08-28 19:32:25.000000000 +0200 +@@ -43,7 +43,7 @@ + Count web traffic only, unless it is being directed through a local web cache. + .TP + \fBicmp\fP +-How much bandwith are users wasting trying to figure out why the network is ++How much bandwidth are users wasting trying to figure out why the network is + slow? + + .SH OPTIONS +@@ -229,7 +229,7 @@ + Controls the appearance of each item in the display. + .TP + \fBshow-totals:\fP \fI(yes|no)\fP +-Shows cummulative total for each item. ++Shows cumulative total for each item. + .TP + \fBlog-scale:\fP \fI(yes|no)\fP + Use a logarithmic scale for bar graphs. diff --git a/iftop.spec b/iftop.spec index c8aa4c1..5501938 100644 --- a/iftop.spec +++ b/iftop.spec @@ -1,22 +1,15 @@ -Name: iftop -Version: 0.17 -Release: 4%{?dist} - -Summary: Command line tool that displays bandwidth usage on an interface - -Group: Applications/Internet -License: GPL -URL: http://www.ex-parrot.com/~pdw/iftop -Source0: http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: ncurses-devel -%if "%{fedora}" >= "6" -BuildRequires: libpcap-devel -%else -BuildRequires: libpcap -%endif - +Summary: Command line tool that displays bandwidth usage on an interface +Name: iftop +Version: 0.17 +Release: 6%{?dist} +License: GPLv2+ +Group: Applications/Internet +URL: http://www.ex-parrot.com/~pdw/%{name}/ +Source: http://www.ex-parrot.com/~pdw/%{name}/download/%{name}-%{version}.tar.gz +Patch0: iftop-0.17-bandwidth.patch +Patch1: iftop-0.17-man-typos.patch +BuildRequires: ncurses-devel, %{_includedir}/pcap.h +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description iftop does for network usage what top(1) does for CPU usage. It listens to @@ -24,33 +17,37 @@ network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question "why is our ADSL link so slow?". - %prep %setup -q - +%patch0 -p1 -b .bandwidth +%patch1 -p1 -b .man-typos %build %configure make %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - +make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT - %files -%defattr(-,root,root,-) -%doc COPYING README TODO -%{_sbindir}/* -%{_mandir}/man8/* - +%defattr(-,root,root) +%doc ChangeLog COPYING README TODO +%{_sbindir}/%{name} +%{_mandir}/man8/%{name}.* %changelog +* Tue Aug 28 2007 Robert Scheck 0.17-6 +- Buildrequire %%{_includedir}/pcap.h instead of conditionals +- Patch to display top scale in bytes when measuring in bytes + +* Sat Aug 25 2007 Aurelien Bompard 0.17-5 +- fix license tag +- rebuild for BuildID + * Wed Nov 29 2006 Aurelien Bompard 0.17-4 - rebuild