# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils DESCRIPTION="Portato - a GUI for Portage written in Python." HOMEPAGE="http://portato.sourceforge.net" SRC_URI="mirror://sourceforge/portato/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="doc" DEPEND="doc? (>=dev-python/epydoc-2.0)" RDEPEND=">=app-portage/gentoolkit-0.2.2 >=dev-python/pygtk-2.8.6 >=x11-libs/vte-0.12.2 >=gnome-base/libglade-2.5.1" S=${WORKDIR}/${PN} CONFIG_DIR="/etc/${PN}/" DATA_DIR="/usr/share/${PN}/" apply_sed () { cd ${S}/${PN} sed -i -e "s;^\(VERSION\s*=\s*\).*;\1\"${PV}\";" \ -e "s;^\(CONFIG_DIR\s*=\s*\).*;\1\"${CONFIG_DIR}\";" \ -e "s;^\(DATA_DIR\s*=\s*\).*;\1\"${DATA_DIR}\";" constants.py } pkg_setup () { if ! built_with_use x11-libs/vte python; then echo eerror "x11-libs/vte has not been built with python support." eerror "Please re-emerge vte with the python use-flag enabled." die "missing python flag for x11-libs/vte" fi } src_unpack() { unpack ${A} } src_install () { (apply_sed) || die "Applying sed-commands failed." dodir ${DATA_DIR} distutils_src_install cd ${S} newbin portato.py portato dodoc doc/* # config dodir ${CONFIG_DIR} cp etc/* ${D}${CONFIG_DIR} # doc if use doc; then epydoc ${PN} dohtml -r html/* fi }