# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit depend.php MY_PV=${PV//_alpha/} MY_PV=${MY_PV//./} MY_P="${PN}${MY_PV}" DESCRIPTION="A web based administration tool for Nagios 2 and 3" HOMEPAGE="http://www.nagiosql.org/" SRC_URI="mirror://sourceforge/nagiosql/${MY_P}.tar.gz" LICENSE="BSD-4" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=dev-php/PEAR-HTML_Template_IT-1.2.1" RDEPEND="${DEPEND} >=net-analyzer/nagios-core-3.1.0 >=dev-db/mysql-4.1.0" pkg_setup() { require_php_with_use ftp mysql nls session ewarn "You will need /etc/init.d/apache2 restart after install or rebuild PHP!" } src_unpack() { if [ "${A}" != "" ]; then unpack ${A} mv "${PN}3" "${PN}" || die "Rename failed!" fi einfo "Nothing to compile." } src_install() { dodir "/usr/share" cp -R "${PN}" "${D}/usr/share/" || die "Install failed!" touch "${D}/usr/share/${PN}/install/ENABLE_INSTALLER" fowners apache "/usr/share/${PN}/config" DIR_ETC="/etc/nagiosql" dodir "${DIR_ETC}/backup/hosts" \ "${DIR_ETC}/backup/services" \ "${DIR_ETC}/hosts" \ "${DIR_ETC}/services" fowners -R nagios:apache ${DIR_ETC} fperms -R 0770 ${DIR_ETC} } pkg_postinst() { einfo "You should add the Apache user to the Nagios group." einfo einfo "Goto http://localhost/nagios/nagiosql/install/ and configure." einfo "Remove 'nagiosql/install/ENABLE_INSTALLER' later." }