summaryrefslogtreecommitdiff
blob: 183544630d5023648cc7b1069a86d527af12bfb9 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
PYTHON_COMPAT=( python2_7 )

inherit eutils gnome2-utils multilib python-single-r1 toolchain-funcs

DESCRIPTION="a Rhythmbox-like PyGTK+ client for Music Player Daemon"
HOMEPAGE="https://sourceforge.net/projects/pympd"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc ~sparc x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
	>=dev-python/pygtk-2.6:2[${PYTHON_USEDEP}]
	gnome-base/libglade:2.0
	x11-libs/gdk-pixbuf:2[jpeg]
	x11-themes/adwaita-icon-theme
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

PATCHES=( "${FILESDIR}"/${P}-desktop-entry.patch )

pkg_setup() {
	python-single-r1_pkg_setup
}

src_prepare() {
	default
	python_fix_shebang .
	sed -i -e 's:FLAGS =:FLAGS +=:' src/modules/tray/Makefile || die
	sed -i -e 's:\..\/py:/usr/share/pympd/py:g' src/glade/pympd.glade || die
}

src_compile() {
	emake CC="$(tc-getCC)" PREFIX=/usr DESTDIR="${D}"
}

src_install() {
	emake PREFIX=/usr DESTDIR="${D}" install
	einstalldocs
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}