File bw.spec of Package bw
# vim: set sw=4 ts=4 et nu:
# norootforbuild
Name: bw
Version: 0.9.8
Release: 0
Summary: Command-Line Bandwidth Monitoring Tool
Source: http://bandwidth-tool.googlecode.com/files/bandwidth-%{version}.tgz
Patch1: bw-fix_strlen.patch
URL: http://code.google.com/p/bandwidth-tool/downloads/list
Group: Productivity/Networking/Diagnostic
License: GNU General Public License version 2 or later (GPL v2 or later)
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: gcc make glibc-devel
Provides: bandwidth = %{version}
%description
Bandwidth-tool (bw) is a sniffer program for 802.3 networks designed for
command line which works without using any external library. You can obtain the
amount of kb/s of any communication and get statistics of ports used and
traffic by IPs.
%prep
%setup -q -n "bandwidth-%{version}"
%patch1
%build
%__make %{?jobs:-j%{jobs}} \
CC="%__cc"
%install
%__install -D -m0755 bw "%{buildroot}%{_sbindir}/bw"
%__install -D -m0644 bw.1 "%{buildroot}%{_mandir}/man1/bw.1"
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc *.txt COPYING
%{_sbindir}/bw
%doc %{_mandir}/man1/bw.1%{ext_man}