Source

belak.gentoo / app-misc / sunflower / sunflower-9999.ebuild

Full commit
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

PYTHON_DEPEND="2"

inherit python mercurial

DESCRIPTION="Small and highly customizable twin-panel file manager"
HOMEPAGE="http://code.google.com/p/sunflower-fm/"

EHG_REPO_URI="https://code.google.com/p/sunflower-fm/"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE=""

DEPEND=""
RDEPEND="dev-python/notify-python
	dev-python/gnome-vfs-python
	dev-python/libwnck-python
	x11-libs/vte"

S="${WORKDIR}"/"${PN}"-"${PV}"

pkg_setup(){
	python_set_active_version 2
}

src_install(){
	insinto /opt/sunflower
	doins -r .
	dodir /usr/bin
	cat > "${ED}"/usr/bin/sunflower << EOF
#!/bin/sh

python2 "${EPREFIX}"/opt/sunflower/Sunflower.py
EOF
	chmod +x "${ED}"/usr/bin/sunflower
}

pkg_postinst(){
	python_mod_optimize "${EPREFIX}"/opt/sunflower/application
}

pkg_postrm(){
	python_mod_cleanup "${EPREFIX}"/opt/sunflower/application
}