File batti.spec of Package batti
#
# spec file for package batti
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: batti
Version: 0.3.8
Release: 0
License: GPL-2.0
Summary: Simple battery monitor
Url: http://opendesktop.org/content/show.php/batti?content=132291
Group: System/GUI/Other
Source: http://opendesktop.org/CONTENT/content-files/132291-%{name}-%{version}.tar.gz
Patch1: upower-0.99.patch
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(x11)
Requires: dbus-1-python
Requires: python-gtk
Requires: upower
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
A simple battery monitor for the system tray 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.
%lang_package
%prep
%setup -q
%patch1 -p1
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 \
--prefix=%{_prefix} \
--root %{buildroot} \
--record-rpm=files.lst
%fdupes %{buildroot}%{python_sitelib}/%{name}
%find_lang %{name}
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/actions/%{name}*.??g
%{_datadir}/icons/hicolor/*/apps/%{name}*.??g
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}-%{version}-py%{py_ver}.egg-info
%files lang -f %{name}.lang