blob: 2659d53b3232cb6106d6f1e5fc983d4eff9788e6 [file] [log] [blame]
%{!?pytho1_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
Summary: Ethernet settings python bindings
Name: python-inet_diag
Version: 0.1
Release: 1%{?dist}
URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-inet_diag.git
Source: http://userweb.kernel.org/~acme/python-inet_diag/%{name}-%{version}.tar.bz2
License: GPLv2
Group: System Environment/Libraries
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Python bindings for the inet_diag kernel interface, that allows querying AF_INET
socket state.
%prep
%setup -q
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
cp -p pss.py %{buildroot}%{_sbindir}/pss
cp -p psk.py %{buildroot}%{_sbindir}/psk
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING
%{_sbindir}/pss
%{_sbindir}/psk
%{python_sitearch}/inet_diag.so
%if "%{python_ver}" >= "2.5"
%{python_sitearch}/*.egg-info
%endif
%changelog
* Wed May 13 2009 * Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-1
- Initial package