summaryrefslogtreecommitdiff
blob: d412afab0f6b331a0ca82e83cb4e9f0425a6cc9a (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/hachoir-metadata/hachoir-metadata-1.1.ebuild,v 1.2 2008/04/04 20:46:42 cedk Exp $

NEED_PYTHON=2.4

inherit distutils

DESCRIPTION="tool to extract metadata from multimedia files"
HOMEPAGE="http://hachoir.org/wiki/hachoir-metadata"
SRC_URI="http://cheeseshop.python.org/packages/source/h/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc ~x86"
IUSE="gnome gtk kde"

DEPEND=""
RDEPEND=">=dev-python/hachoir-core-1.1
	>=dev-python/hachoir-parser-1.1
	gtk? ( >=dev-python/pygtk-2.0 )
	gnome? ( gnome-base/nautilus gnome-extra/zenity )
	kde? ( kde-base/konqueror )"

PYTHON_MODNAME="hachoir_metadata"

src_install() {
	distutils_src_install

	if use gnome; then
		exeinto /usr/share/nautilus-scripts
		doexe gnome/hachoir
	fi

	if use kde; then
		exeinto /usr/bin
		doexe kde/hachoir-metadata-kde
		insinto /usr/share/apps/konqueror/servicemenus
		doins kde/hachoir.desktop
	fi

	if ! use gtk; then
		rm "${D}"/usr/bin/hachoir-metadata-gtk
	fi
}

pkg_postinst() {
	if use gnome; then
		elog "To enable the nautilus script symlink it with:"
		elog " $ mkdir -p ~/.gnome2/nautilus-scripts"
		elog " $ ln -s /usr/share/nautilus-scripts/hachoir " \
			"~/.gnome2/nautilus-script"
	fi
}