File iftop.spec of Package iftop

#
# spec file for package iftop
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           iftop
Summary:        Real-Time Interface Bandwidth Usage
License:        GPL-2.0+
Group:          Productivity/Networking/Diagnostic
Version:        0.99.3
Release:        0
%define         pkg_version 1.0pre3
Url:            http://www.ex-parrot.com/~pdw/iftop/
BuildRequires:  libpcap-devel
BuildRequires:  ncurses-devel
BuildRequires:  automake
Source0:        http://www.ex-parrot.com/~pdw/iftop/download/iftop-%{pkg_version}.tar.gz
# Patch1:         %name-manpage.patch
Patch3:         iftop-implicit-pointer-decl.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
iftop does for network usage what top(1) does for CPU usage. It listens
to network traffic on a named interface and displays a table of current
bandwidth usage by pairs of hosts. It is handy for explaining why the
network links slow.

%prep
%setup -q -n %name-%pkg_version
#patch1 -p0
%patch3 -p1

%build
autoreconf -fiv
export CFLAGS="%optflags $(ncursesw6-config --cflags)"
export LDFLAGS="$(ncursesw6-config --libs)"
%configure
%__make %{?smp_mflags} CPPFLAGS=-DUSE_GETIFADDRS

%install
%makeinstall

%clean
%{?buildroot:%__rm -rf '%{buildroot}'}

%files
%defattr(-,root,root)
%doc README ChangeLog COPYING TODO
%{_sbindir}/iftop
%doc %{_mandir}/man8/iftop.8*

%changelog
openSUSE Build Service is sponsored by