app-laptop/batti: x86 stable, bug #586462
[gentoo.git] / app-laptop / batti / batti-0.3.8-r2.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 SUPPORT_PYTHON_ABIS="1"
8 PYTHON_DEPEND="2"
9 RESTRICT_PYTHON_ABIS="3.*"
10
11 inherit python distutils gnome2-utils eutils
12
13 DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon"
14 HOMEPAGE="https://code.google.com/p/batti-gtk/"
15 SRC_URI="https://batti-gtk.googlecode.com/files/${P}.tar.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="libnotify"
21
22 RDEPEND="dev-python/pygtk
23         dev-python/dbus-python
24         || ( sys-power/upower sys-power/upower-pm-utils )
25         x11-themes/gnome-icon-theme
26         libnotify? ( x11-libs/libnotify )"
27 DEPEND=""
28
29 DOCS="AUTHORS"
30
31 src_prepare() {
32         has_version ">=sys-power/upower-0.99" && epatch "${FILESDIR}/${P}-upower-0.99.patch"
33 }
34
35 pkg_preinst() {
36         gnome2_icon_savelist
37 }
38
39 pkg_postinst() {
40         gnome2_icon_cache_update
41         distutils_pkg_postinst
42 }
43
44 pkg_postrm() {
45         gnome2_icon_cache_update
46         distutils_pkg_postrm
47 }