blob: 23a158e1a6acd83399e9647282555cad5aac43df (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/gtimelog/gtimelog-0.8.0.ebuild,v 1.3 2013/03/25 16:15:33 ago Exp $
EAPI="4"
PYTHON_DEPEND="2"
inherit eutils distutils virtualx
DESCRIPTION="A small Gtk+ application for keeping track of your time"
HOMEPAGE="http://mg.pov.lt/gtimelog/"
LICENSE="GPL-2"
SLOT="0"
SRC_URI="https://launchpad.net/gtimelog/devel/${PV}/+download/${P}.tar.gz"
KEYWORDS="amd64 x86"
IUSE="ayatana test"
# gnome-base/gnome-desktop provides gnome-week.png
RDEPEND="dev-libs/gobject-introspection
dev-python/dbus-python
dev-python/pygobject:3
gnome-base/gnome-desktop:2
x11-libs/gtk+:3[introspection]
x11-libs/pango[introspection]
ayatana? ( dev-libs/libappindicator:3[introspection] )"
DEPEND="test? (
${RDEPEND}
ayatana? ( dev-libs/libappindicator:3[introspection] ) )"
DISTUTILS_SRC_TEST="setup.py"
pkg_setup() {
python_set_active_version 2
python_pkg_setup
DOCS="HACKING.txt NEWS.txt NOTES.txt README.txt"
}
src_prepare() {
python_convert_shebangs -r 2 .
# Support prefixed installation
sed -e "s:\"/usr:\"${EPREFIX}/usr:g" \
-i src/gtimelog/main.py || die "sed failed"
distutils_src_prepare
}
src_test() {
VIRTUALX_COMMAND=distutils_src_test virtualmake
}
src_install() {
domenu gtimelog.desktop
doicon src/gtimelog/gtimelog-*.png
insinto /usr/share/gtimelog
doins src/gtimelog/*.ui src/gtimelog/gtimelog.png
exeinto /usr/share/gtimelog/scripts
doexe scripts/*.py
distutils_src_install
# Don't install icons in /usr/lib/python*
find "${ED}/$(python_get_sitedir)" -regex '.*\(png\|ui\)$' -exec rm -f {} + || die
}
|