summaryrefslogtreecommitdiff
blob: 787cc05f0f6b1c69246d3afdfb683385e35d05d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/nut-monitor/nut-monitor-1.3-r2.ebuild,v 1.1 2012/04/03 10:09:32 pacho Exp $

EAPI=4
PYTHON_DEPEND="2"

inherit eutils python

DESCRIPTION="A graphical application to monitor and manage UPSes connected to a NUT server"
HOMEPAGE="http://www.lestat.st/informatique/projets/nut-monitor-en/"
SRC_URI="http://www.lestat.st/_media/informatique/projets/${PN}/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="linguas_fr"

RDEPEND="dev-python/pygtk
	dev-python/pynut"
DEPEND=""

pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}

src_prepare() {
	epatch "${FILESDIR}"/${P}-paths.patch
	epatch "${FILESDIR}"/${P}-paths2.patch
	python_convert_shebangs -r 2 .
}

src_install() {
	dobin NUT-Monitor
	dosym NUT-Monitor /usr/bin/${PN}

	insinto /usr/share/nut-monitor
	doins gui-${PV}.glade

	dodir /usr/share/nut-monitor/pixmaps
	insinto /usr/share/nut-monitor/pixmaps
	doins pixmaps/*

	doicon ${PN}.png
	domenu ${PN}.desktop

	dodoc README

	if use linguas_fr; then
		insinto /usr/share/locale/fr/LC_MESSAGES/
		doins locale/fr/LC_MESSAGES/NUT-Monitor.mo
	fi
}