%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: 14%{?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: python2-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
Requires: pygtk2
Requires: python2-dbus
Requires: python2-notify
%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}
%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
* Sun Jan 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.8-14
- Remove obsolete scriptlets
* Fri Dec 15 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.8-13
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-10
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jan 16 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.8-1
- Update to 0.3.8 (#670030)
* Fri Jul 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Fri May 21 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.7-2
- Fix License tag
- Add COPYING to doc
* Sun May 16 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.7-1
- Update to 0.3.7
- BuildRequire gettext
* Thu May 13 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.5-1
- Update to 0.3.5
* Fri Apr 16 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.4-1
- Update to 0.3.4
* Tue Apr 13 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.1-1
- Update to 0.3.1
* Thu Apr 08 2010 Christoph Wickert <cwickert@fedoraproject.org> -
- Initial package