# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp depend.php DESCRIPTION="Web front end for ganglia cluster monitoring software" HOMEPAGE="http://ganglia.sourceforge.net/" SRC_URI="mirror://sourceforge/ganglia/ganglia-${PV}.tar.gz" LICENSE="BSD-2" KEYWORDS="~amd64 ~ppc ~x86" IUSE="" RDEPEND="~sys-cluster/ganglia-${PV}" need_httpd_cgi need_php_httpd S=${WORKDIR}/ganglia-${PV}/web pkg_setup() { webapp_pkg_setup require_gd } src_unpack() { unpack ${A} cd "${S}" for var in GANGLIA_RELEASE_NAME GANGLIA_MAJOR_VERSION GANGLIA_MINOR_VERSION GANGLIA_MICRO_VERSION ; do eval $(grep "${var}=" "${WORKDIR}"/ganglia-${PV}/configure.in) done sed -i -e "s:@GANGLIA_RELEASE_NAME@:${GANGLIA_RELEASE_NAME}:" \ -e "s:@GANGLIA_MAJOR_VERSION@:${GANGLIA_MAJOR_VERSION}:" \ -e "s:@GANGLIA_MINOR_VERSION@:${GANGLIA_MINOR_VERSION}:" \ -e "s:@GANGLIA_MICRO_VERSION@:${GANGLIA_MICRO_VERSION}:" \ -e "s:@GANGLIA_VERSION@:${GANGLIA_MAJOR_VERSION}.${GANGLIA_MINOR_VERSION}.${GANGLIA_MICRO_VERSION}:" \ version.php.in || die "sed failed" mv version.php.in version.php } src_install () { webapp_src_preinst dodoc AUTHORS ChangeLog rm -f AUTHORS ChangeLog COPYING Makefile.am insinto "${MY_HTDOCSDIR}" doins -r . webapp_configfile "${MY_HTDOCSDIR}"/conf.php webapp_src_install }