summaryrefslogtreecommitdiff
blob: ddcf9d6d5a3cc8a4eb0bfd9196e252399c8917b9 (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: $

inherit python eutils

MY_P="${P}-src"

DESCRIPTION="imgv is a unique and feature rich image viewer using Python"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
HOMEPAGE="http://sourceforge.net/projects/imgv"
SLOT=0
LICENSE=GPL-2
KEYWORDS="~x86"
IUSE=""

DEPEND="dev-python/pygtk
	dev-python/pygame
	dev-python/imaging"
RDEPEND="${DEPEND}"

S="${WORKDIR}"/${MY_P}

src_install() {
	python_version
	INST_DIR="/usr/lib/python${PYVER}/site-packages/${PN}"

	insinto ${INST_DIR}
	cd ${S}
	doins -r *.py
	insinto ${INST_DIR}/data
	cd ${S}/data
	doins -r *

	cd ${S}
	echo "IMGV_HOME=${INST_DIR}" >> 90imgv
	insinto /etc/env.d
	doins 90imgv

	make_wrapper imgv "/usr/bin/python ${INST_DIR}/imgv.py"
}

pkg_postinst() {
	python_version
	python_mod_optimize /usr/lib/python${PYVER}/site-packages/${PN}
}

pkg_postrm() {
	python_version
	python_mod_cleanup /usr/lib/python${PYVER}/site-packages/${PN}

}