%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif Name: batti Version: 0.3.8 Release: 9%{?dist} Summary: Simple battery monitor for the system tray Group: Applications/System License: GPLv2+ URL: http://batti-gtk.googlecode.com/ Source0: http://batti-gtk.googlecode.com/files/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: desktop-file-utils BuildRequires: gettext Requires: pygtk2 Requires: dbus-python Requires: notify-python %if 0%{?fedora} >= 13 Requires: upower %else Requires: DeviceKit-power %endif %description Batti is a simple battery monitor for the system tray, similar to batterymon. Unlike the latter batti uses UPower, and if that is missing DeviceKit.Power, for it's power information. Features * one tray icon per inserted battery * tray icons (dis-)appear with the battery (un-)plugging * notification on low and critical battery status * use of GTK icon-theme * suspend/hibernate menu on left-click, if allowed by PolicyKit %prep %setup -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ "$1" -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING %{_bindir}/%{name} %{python_sitelib}/%{name}*.egg-info %{python_sitelib}/%{name}/ %{_datadir}/applications/batti.desktop %{_datadir}/icons/hicolor/*/*/%{name}* %changelog * Wed Feb 03 2016 Fedora Release Engineering - 0.3.8-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 0.3.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.3.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 0.3.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 13 2013 Fedora Release Engineering - 0.3.8-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Jul 18 2012 Fedora Release Engineering - 0.3.8-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jan 12 2012 Fedora Release Engineering - 0.3.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Feb 07 2011 Fedora Release Engineering - 0.3.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Jan 16 2011 Christoph Wickert - 0.3.8-1 - Update to 0.3.8 (#670030) * Fri Jul 30 2010 Thomas Spura - 0.3.7-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Fri May 21 2010 Christoph Wickert - 0.3.7-2 - Fix License tag - Add COPYING to doc * Sun May 16 2010 Christoph Wickert - 0.3.7-1 - Update to 0.3.7 - BuildRequire gettext * Thu May 13 2010 Christoph Wickert - 0.3.5-1 - Update to 0.3.5 * Fri Apr 16 2010 Christoph Wickert - 0.3.4-1 - Update to 0.3.4 * Tue Apr 13 2010 Christoph Wickert - 0.3.1-1 - Update to 0.3.1 * Thu Apr 08 2010 Christoph Wickert - - Initial package