# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit versionator CACTI_VERSION="0.8.7h" MY_PN="${PN/*-}" MY_PV="${PV/.0./.}" DESCRIPTION="cacti ${MY_PN} plugin" HOMEPAGE="http://cactiusers.org/" SRC_URI="http://docs.cacti.net/_media/plugin:${MY_PN}-v$(replace_version_separator 2 - ${MY_PV}).tgz -> ${PN}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="" RDEPEND="net-analyzer/cacti[plugin]" DEPEND="" read_webapp_config() { ENVVAR=$(webapp-config --query cacti ${CACTI_VERSION}) eval ${ENVVAR} } src_install() { read_webapp_config insinto "${MY_HTDOCSDIR}/plugins" doins -r "${MY_PN}" || die } pkg_postinst() { einfo "You need to update vhost, run the following or similar:" einfo "webapp-config -U -h localhost -u root -d /cacti cacti ${CACTI_VERSION}" }