summaryrefslogtreecommitdiff
blob: c16026ea377da5053176b2846360f6d197f673ce (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

PYTHON_MODNAME="spectlib"
inherit distutils

DESCRIPTION="A desktop application to watch configurable events and then trigger notifications."
HOMEPAGE="http://specto.sourceforge.net/"
SRC_URI="http://specto.googlecode.com/files/${P}.tar.gz"

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

LANGS="cs de es fr it pt_BR ro sv tr"
for i in ${LANGS} ; do
	IUSE="${IUSE} linguas_${i}"
done

DEPEND="dev-python/dbus-python
	dev-python/gnome-python
	dev-python/gnome-python-extras
	dev-python/notify-python
	>=dev-python/pygtk-2.10"
RDEPEND=${DEPEND}

src_unpack() {
	distutils_src_unpack

	sed -i -e "s:share/doc/specto:share/doc/${PF}:" \
		"${S}"/setup.py "${S}"/spectlib/util.py || die

	# Replace some GNOME icons with their FreeDesktop equivalents
	# so that it works with oxygen as a theme.
	sed -i -e '/icon_theme\.load_icon/s:"error":"dialog-error":g' \
		"${S}"/spectlib/*.py || die
	sed -i -e '/icon_theme\.load_icon/s:"reload":"view-refresh":g' \
		"${S}"/spectlib/*.py || die
}

src_install() {
	distutils_src_install
	dodoc data/doc/{AUTHORS,ChangeLog} || die
	rm -rf "${D}"/usr/share/doc/${PN}
	for i in ${LANGS} ; do
		use linguas_${i} || rm -rf "${D}"/usr/share/locale/${i}
	done
}