# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" PYTHON_DEPEND="2" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.*" inherit eutils distutils DESCRIPTION="Enterprise scalable realtime graphing" HOMEPAGE="http://graphite.wikidot.com/" SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="Apache-2.0" KEYWORDS="~amd64 ~x86" SLOT="0" IUSE="-apache2 -mysql sqlite" DEPEND="" RDEPEND="${DEPEND} sqlite? ( dev-lang/python[sqlite] dev-python/django[sqlite] ) mysql? ( dev-python/django[mysql] ) dev-python/carbon dev-python/django dev-python/pycairo dev-python/twisted dev-python/whisper apache2? ( www-apache/mod_python ) dev-python/django-tagging" src_prepare() { # This sets prefix to /opt/graphite. We want FHS-style paths instead. rm setup.cfg || die # Do not install the configuration and data files. We install them # somewhere sensible by hand. epatch "${FILESDIR}/no-data-files.patch" epatch "${FILESDIR}/${PV}-local_settings.patch" distutils_src_prepare } src_install() { distutils_src_install insinto /etc/${PN} doins conf/* dodoc examples/* dodir /usr/share/${PN} cp -r "${S}"/webapp/* "${D}"/usr/share/${PN} || die "webapp install failed" } pkg_postinst { einfo "See /usr/share/doc/${PN}/wsgi.py.example for wsgi app." einfo "Don't forget to add local_settings.py, .example in /usr/share/${PN}" }