File tcpick.spec of Package tcpick
Name: tcpick
Version: 0.2.1
Release: 1%{?dist}
Summary: A CLI packet sniffer that reassembles tcp streams (i.e. can capture files)
Group: Productivity/Networking/Diagnostic
License: GPLv2+
URL: http://tcpick.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
BuildRequires: libpcap-devel
%description
tcpick is a console-based packet sniffer can reassemble tcp streams. Tcpick is
able to save the captured flows in different files or displays them in the
terminal, and so it is useful to capture files that are transmitted via FTP or
HTTP.
It can display all the streams on the terminal, when the connection is closed
in different display modes like hexdump, hexdump + ascii, only printable
characters, raw mode and so on. Colored output is an option, while it's
primarily useful for capturing files this ability also makes it useful for
keeping track of what users of a network are doing. Being console-based, all
the usual text processing tools can be used with it, either during live
capture or afterwards.
%prep
%setup -q
%build
# Yes this is naughty but it fails serious compiler warnings check otherwise.
# And the warning isn't really serious because the return values aren't used.
CFLAGS="%{optflags} -w"
export CFLAGS
%configure
make %{?_smp_mflags}
%__gzip -9 tcpick.8 tcpick_italian.8
%install
%__mkdir_p "%{buildroot}/%{_defaultdocdir}/tcpick"
%__mkdir_p "%{buildroot}/%{_mandir}/man8"
%__mkdir_p "%{buildroot}/%{_mandir}/it/man8"
%__mkdir_p "%{buildroot}/%{_sbindir}"
%__cp -t "%{buildroot}/%{_defaultdocdir}/tcpick" ./doc/INTERNALS.html \
./doc/KNOWN-BUGS.html ./doc/EXAMPLES.html ./doc/AUTHORS.html
%__cp -t "%{buildroot}/%{_mandir}/man8" ./tcpick.8.gz
%__mv ./tcpick_italian.8.gz ./tcpick.8.gz
%__cp -t "%{buildroot}/%{_mandir}/it/man8" ./tcpick.8.gz
%__cp -t "%{buildroot}/%{_sbindir}" ./src/tcpick
%clean
%__rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_sbindir}/*
%doc
%{_mandir}/man8/*.8.gz
%{_mandir}/it/man8/*.8.gz
%{_defaultdocdir}/tcpick
%changelog