media-sound/qtscrobbler: EAPI-7 bump, use xdg-utils.eclass
[gentoo.git] / media-sound / tunapie / tunapie-2.1.19-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 )
6 inherit eutils python-single-r1
7
8 DESCRIPTION="Directory browser for Radio and TV streams"
9 HOMEPAGE="http://tunapie.sourceforge.net"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="offensive"
16
17 RDEPEND="
18         $(python_gen_cond_dep '
19                 >=dev-python/wxpython-2.6[${PYTHON_MULTI_USEDEP}]
20         ')
21         ${PYTHON_DEPS}"
22 DEPEND="${RDEPEND}"
23
24 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
25
26 src_prepare() {
27         default
28
29         # fix pixmap lookup
30         sed -i -e 's@../pixmaps@../../share/pixmaps@' \
31                 src/tunapie2_main.py || die
32
33         # the original script requires more sed than code,
34         cat > tunapie <<-_EOF_ || die
35                 #!/bin/sh
36                 exec ${EPYTHON} /usr/lib/tunapie/Tunapie.py
37         _EOF_
38 }
39
40 src_install() {
41         dobin tunapie
42         doman tunapie.1
43         dodoc CHANGELOG README
44
45         python_moduleinto /usr/lib/tunapie
46         python_domodule src/{*.py,*.png}
47
48         doicon src/tplogo.xpm
49         domenu tunapie.desktop
50
51         dodir /etc
52         usex offensive 1 0 > "${ED%/}"/etc/tunapie.config || die
53 }