File tcpwatch.spec of Package tcpwatch

# vim: set sw=4 ts=4 et:

%{!?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))")}

Name:               tcpwatch
Version:            1.3.1
Release:            0
Summary:            Monitor Forwarded TCP Connections or HTTP Proxy Connections
Source:             https://pypi.python.org/packages/source/t/tcpwatch/tcpwatch-%{version}.tar.gz
URL:                https://pypi.python.org/pypi/tcpwatch/
Group:              Development/Libraries/Python
License:            Zope Public License version 2.0 (ZPL 2.0)
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      gcc
BuildRequires:      glibc-devel
BuildRequires:      make
BuildRequires:      pkgconfig
BuildRequires:      python
BuildRequires:      python-devel
BuildRequires:      python-setuptools
%if 0%{?suse_version} >= 1120
BuildArch:          noarch
%endif
%py_requires
Provides:           python-tcpwatch = %{version}

%description
TCPWatch is a utility written in Python that lets you monitor forwarded TCP
connections or HTTP proxy connections. It displays the sessions in a window
with a history of past connections. It is useful for developing and debugging
protocol implementations and web services.

%prep
%setup -q

%build
%__python ./setup.py build

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

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

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

%files
%defattr(-,root,root)
%doc *.txt
%{_bindir}/tcpwatch
openSUSE Build Service is sponsored by