File pktstat.spec of Package pktstat
# vim: set ts=4 sw=4 et:
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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: pktstat
Version: 1.8.5
Release: 0
Summary: Realtime Packet Activity Viewer for the Console
Source: http://www.adaptive-enterprises.com.au/~d/software/pktstat/pktstat-%{version}.tar.gz
Source1: %{name}.desktop
Patch1: %{name}-fix-compat.diff
URL: http://www.adaptive-enterprises.com.au/~d/software/pktstat/
Group: Productivity/Networking/Diagnostic
License: Public Domain
BuildRoot: %{_tmppath}/build-%{name}-%{version}
%if %suse_version >= 1030
BuildRequires: libpcap-devel libpcap
%else
BuildRequires: libpcap
%endif
BuildRequires: gcc ncurses-devel glibc-devel make
BuildRequires: autoconf automake libtool update-desktop-files
%description
pktstat listens to the network and shows the bandwidth being consumed by
packets of various kinds in realtime. It understands some protocols (including
FTP, HTTP, and X11) and adds a descriptive name next to the entry.
%prep
%setup -q
%patch1
%build
autoreconf -fiv
%configure
%__make %{?_smp_mflags}
%install
%makeinstall
%__install -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%suse_update_desktop_file -r "%{name}" Network System Monitor
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc ChangeLog COPYING NEWS README
%{_bindir}/pktstat
%doc %{_mandir}/man1/pktstat.1*
%{_datadir}/applications/%{name}.desktop
%changelog