summaryrefslogtreecommitdiff
blob: ab7a4a2b2aa14cbccc2ca2d6acd65d9bbbe3f015 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild,v 1.3 2006/10/08 15:57:13 malc Exp $

inherit python eutils

DESCRIPTION="This is a plugin to copy songs to your iPod and browse/delete existing songs using libgpod."
HOMEPAGE="http://www.sacredchao.net/quodlibet/wiki/Plugins/iPod"
SRC_URI="mirror://gentoo/quodlibet-ipod-0.4.tar.gz"

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

DEPEND=""
RDEPEND=">=media-libs/libgpod-0.3.2-r1
	>=media-sound/quodlibet-0.19.1"

PLUGIN_DEST="/usr/share/quodlibet/plugins/songsmenu"

pkg_setup() {
	if !(built_with_use media-libs/libgpod python); then
		eerror "media-libs/libgpod must be built with 'python' support."
		die "Recompile media-libs/libgpod after enabling the 'python' USE flag"
	fi
}

src_unpack() {
	unpack "${A}"
	epatch "${FILESDIR}"/${PV}-ipod-detect.patch
}

src_install() {
	cd "${WORKDIR}"

	insinto ${PLUGIN_DEST}
	doins ipod_base.py

	dodir ${PLUGIN_DEST}/ipod
	insinto ${PLUGIN_DEST}/ipod
	doins ipod/*
}

pkg_postinst() {
	python_mod_compile ${PLUGIN_DEST}/ipod_base.py
	python_mod_optimize ${PLUGIN_DEST}/ipod
}

pkg_postrm() {
	python_mod_cleanup ${PLUGIN_DEST}
}