# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils webapp DESCRIPTION="A lighweight system monitoring tool" HOMEPAGE="http://www.monitorix.org/" SRC_URI="http://www.monitorix.org/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 x86" IUSE="evms hddtemp lm_sensors postfix" RESTRICT="primaryuri" DEPEND="sys-apps/sed" RDEPEND="net-analyzer/rrdtool[perl] dev-perl/DBI dev-perl/libwww-perl evms? ( sys-fs/evms ) hddtemp? ( app-admin/hddtemp ) lm_sensors? ( sys-apps/lm_sensors ) postfix? ( net-mail/pflogsumm )" WEBAPP_MANUAL_SLOT="yes" src_install() { webapp_src_preinst dosbin ${PN} || die "dosbin failed" newinitd "${FILESDIR}"/${PN}.init.d ${PN} || die "newinitd failed" insinto /etc doins ${PN}.conf || die "doins failed" insinto /etc/logrotate.d newins docs/${PN}.logrotate ${PN} || die "newins failed" dodoc Changes COPYING README{,.nginx} docs/${PN}-{alert.sh,apache.conf,lighttpd.conf} || die "dodoc failed" doman man/man5/${PN}.conf.5 || die "doman failed" doman man/man8/${PN}.8 || die "doman failed" insinto "${MY_HTDOCSDIR}" doins logo_bot.png logo_top.png monitorixico.png || die "doins failed" dodir "${MY_HTDOCSDIR}/imgs" || die "dodir failed" webapp_serverowned "${MY_HTDOCSDIR}/imgs" exeinto ${MY_CGIBINDIR} doexe ${PN}.cgi || die "doexe failed" dodir /var/lib/${PN} || die "dodir failed" dodir /var/lib/${PN}/usage || die "dodir failed" insinto /var/lib/${PN}/reports doins -r reports/* || die "doins failed" webapp_src_install } pkg_preinst() { elog "The use of slots in ${PN} has been corrected." elog "If you experience file collisions while installing," elog "please unmerge ${PN} first. Future updates will" elog "not need this and will be treated as regular" elog "package updates." } pkg_postinst() { elog "Sections have been added to the ${PN} config," elog "ensure you update your config accordingly before" elog "starting this new version." elog "" elog "If you have issues with webapp-config when installing" elog "this package, please ensure your server is set correctly" elog "in /etc/vhosts/webapp-config." webapp_pkg_postinst }