%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: gtraffic Version: 1.01 Release: 5%{?dist} Summary: Simple traffic usage counter for mobile broadband connections Group: Applications/Internet License: GPLv3+ URL: http://fsckyou.info/gtraffic/ Source0: http://fsckyou.info/gtraffic/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: desktop-file-utils Requires: NetworkManager Requires: gnome-python2-gconf %description gtraffic is a very quick and simple network traffic counter. It has the ability to manually change the used traffic, for example if used between two computers. It features a reset, so the usage can be reset at required intervals. This utility will only work with NetworkManager and a mobile broadband connection, otherwise no data will be counted. %prep %setup -q ############################## # rename trafficd to gtrafficd # upstream agreed for this sed -i 's|trafficd|gtrafficd|g' setup.py sed -i 's|trafficd|gtrafficd|g' data/trafficd.desktop mv trafficd gtrafficd mv data/trafficd.desktop data/gtrafficd.desktop ############################## %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} desktop-file-install \ --add-category="GTK" \ --delete-original \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/%{name}.desktop desktop-file-install \ --add-category="GTK" \ --delete-original \ --dir=%{buildroot}%{_sysconfdir}/xdg/autostart \ %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}d.desktop %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc PKG-INFO %{_bindir}/%{name} %{_bindir}/%{name}d %config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}d.desktop %{_datadir}/applications/%{name}.desktop %{python_sitelib}/%{name}/ %{python_sitelib}/%{name}*.egg-info %changelog * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.01-5 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Nov 05 2009 Thomas Spura <tomspur@fedoraproject.org> - 1.01-4 - rename trafficd into gtrafficd in %%prep and not in %%install * Thu Nov 05 2009 Thomas Spura <tomspur@fedoraproject.org> - 1.01-3 - Missing R: NetworkManager and gnome-python2-gconf - only just %%{buildroot} - change trafficd into gtrafficd * Sun Nov 01 2009 Thomas Spura <tomspur@fedoraproject.org> - 1.01-2 - Missing BR desktop-file-utils * Thu Aug 06 2009 Christoph Wickert <cwickert@fedoraproject.org> - 1.01-1 - Initial package