File scapy.spec of Package scapy

# norootforbuild

Name:               scapy
Version:            2.1.1
%define rev 94ae39b9a927
Release:            0
Summary:            Interactive Packet Manipulation Tool
# http://hg.secdev.org/scapy/archive/%{rev}.tar.bz2
Source:             scapy-%{version}.tar.bz2
URL:                http://www.secdev.org/projects/scapy/
Group:              Productivity/Networking/Security
License:            GNU General Public License version 2 or later (GPL v2 or later)
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      python python-devel
BuildRequires:      python-sphinx
BuildRequires:      make
%if 0%{?suse_version} >= 1120
BuildArch:          noarch
%endif
%py_requires

%description
Scapy is a powerful interactive packet manipulation tool, packet generator,
network scanner, network discovery tool, and packet sniffer. It provides
classes to interactively create packets or sets of packets, manipulate them,
send them over the wire, sniff other packets from the wire, match answers and
replies, and more. Interaction is provided by the Python interpreter, so Python
programming structures can be used (such as variables, loops, and functions).
Report modules are possible and easy to make. It is intended to do about the
same things as ttlscan, nmap, hping, queso, p0f, xprobe, arping, arp-sk,
arpspoof, firewalk, irpas, tethereal, tcpdump, etc.

%prep
%setup -q -n "scapy-%{rev}"

%build
%__python ./setup.py build

%__make -C doc/scapy html
%__rm doc/scapy/_build/html/.buildinfo doc/scapy/_build/html/_static/_dummy

%install
%__python ./setup.py install \
    --prefix="%{_prefix}" \
    --root="%{buildroot}" \
    --record-rpm=files.lst

%__perl -ni -e 'print unless m,%{_mandir},' files.lst

%clean
%__rm -rf "%{buildroot}"

%files -f files.lst
%defattr(-,root,root)
%doc %{_mandir}/man1/scapy.1%{ext_man}
%doc doc/scapy/_build/html

%changelog
# vim: set sw=4 ts=4 et nu: