%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get _python_lib; print get_python_lib()")} Summary: A python Traffic Shaper for Linux Name: pyshaper Version: 0.1.3 Release: 1%{?dist} License: LGPLv2 Url: http://www.freenet.org.nz/python/pyshaper/ Source0: http://www.freenet.org.nz/python/pyshaper/pyshaper-%{version}.tar.gz Patch0: pyshaper-0.1.3-setup.patch Group: Applications/Internet BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel >= 2.3 BuildRequires: python-setuptools-devel BuildRequires: python-ezsqlobject Requires: python-GeoIP, tkinter, python-pmw, tcpdump, python-ezsqlobject Buildarch: noarch %description A simple yet versatile program for managing your internet traffic in real time. pyshaper lets you set bandwidth minimum and maximum limits on several criteria: * remote host/port, and local host/port (most shaper apps have this) * pid of locally connected program * username under which local program is running * command line and arguments under which local program was launched * country in which remmote peer resides Or, you can set individual inbound and/or outbound limits based on specific countries (or all countries other than your own). %prep %setup -q %patch0 -p1 -b .setup %build python setup.py build %install rm -rf %{buildroot} python setup.py install --skip-build --root=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %{_sysconfdir}/%{name}/%{name}.conf.readme %{_bindir}/%{name} %{_mandir}/man8/%{name}* %{python_sitelib}/*.egg-info %changelog * Thu Dec 16 2010 Paulo Roma - 0.1.3-1 - Initial spec file.