# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="NagVis is a visualization addon for the well known network managment system Nagios." HOMEPAGE="http://www.nagvis.org/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="net-analyzer/nagios-core dev-lang/php net-www/apache" pkg_setup() { ewarn "checking for use flags, may take a while" if ( ! built_with_use dev-lang/php apache2 ) ; then die "You MUST build dev-lang/php with the apache2 USE flag" fi if ( ! built_with_use dev-lang/php gd ) ; then die "You MUST build dev-lang/php with the gd USE flag" fi if ( ! built_with_use dev-lang/php mysql ) ; then die "You MUST build dev-lang/php with the mysql USE flag" fi } src_compile() { return } src_install() { mkdir -p "${D}"/usr/nagios/share mv "${WORKDIR}"/nagvis-${PV} "${D}"/usr/nagios/share/nagvis chown -R apache:apache "${D}"/usr/nagios/share/nagvis chmod 664 "${D}"/usr/nagios/share/nagvis/nagvis/etc/config.ini.php.dist chmod 775 "${D}"/usr/nagios/share/nagvis/nagvis/images/maps chmod 664 "${D}"/usr/nagios/share/nagvis/nagvis/images/maps/* chmod 775 "${D}"/usr/nagios/share/nagvis/nagvis/etc/maps chmod 664 "${D}"/usr/nagios/share/nagvis/nagvis/etc/maps/* } pkg_postinst() { elog "You will need to set up your /usr/nagios/share/nagvis/nagvis/etc/config.ini.php file before" elog "running NagViz for the first time. there is a sample one in /usr/nagios/share/nagvis/nagvis/etc/config.ini.dist" elog "copy it to /usr/nagios/share/nagvis/nagvis/etc/config.ini.php and edit it with your favourite text editor" }