File python-pcapy.spec of Package python-pcapy
#
# spec file for package python-TraitsGUI
#
# Copyright (c) 2011 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: python-pcapy
Version: 0.11.1
Release: 0
Summary: Python Pcap Extension
URL: https://github.com/CoreSecurity/pcapy
License: Modified Apache License
Group: Development/Libraries/Python
Source: pcapy-%{version}.tar.bz2
Patch0: pcapy-nodocs.patch
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
%if 0%{?suse_version}
%py_requires
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
Pcapy is a Python extension module that enables software written in
Python to access the routines from the pcap packet capture library.
From libpcap's documentation: "Libpcap is a system-independent
interface for user-level packet capture. Libpcap provides a portable
framework for low-level network monitoring. Applications include
network statistics collection, security monitoring, network debugging,
etc."
%prep
%setup -q -n pcapy-%{version}
%patch0 -p1
%build
export CFLAGS="%{optflags}"
python setup.py build
%install
sed -i 's|\r||' ChangeLog LICENSE README # Fix wrong EOL encoding
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc ChangeLog LICENSE README pcapy.html
%{python_sitearch}/*
%changelog