# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.6.ebuild,v 1.1 2012/09/01 15:06:05 flameeyes Exp $ EAPI=4 PATCHSET=1 inherit eutils user java-pkg-opt-2 MY_P=${P/_/-} DESCRIPTION="Munin Server Monitoring Tool" HOMEPAGE="http://munin-monitoring.org/" SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~mips ~ppc ~x86" IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http" REQUIRED_USE="cgi? ( !minimal )" # Upstream's listing of required modules is NOT correct! # Some of the postgres plugins use DBD::Pg, while others call psql directly. # Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. # We replace the original ipmi plugins with the freeipmi_ plugin which at least works. DEPEND_COM="dev-lang/perl sys-process/procps asterisk? ( dev-perl/Net-Telnet ) irc? ( dev-perl/Net-IRC ) mysql? ( virtual/mysql dev-perl/Cache-Cache dev-perl/DBD-mysql ) ssl? ( dev-perl/Net-SSLeay ) postgres? ( dev-perl/DBD-Pg dev-db/postgresql-base ) memcached? ( dev-perl/Cache-Memcached ) cgi? ( dev-perl/FCGI ) syslog? ( virtual/perl-Sys-Syslog ) http? ( dev-perl/libwww-perl ) dev-perl/DBI dev-perl/DateManip dev-perl/File-Copy-Recursive dev-perl/Log-Log4perl dev-perl/Net-CIDR dev-perl/Net-Netmask dev-perl/Net-SNMP dev-perl/net-server[ipv6(-)?] virtual/perl-Digest-MD5 virtual/perl-Getopt-Long virtual/perl-MIME-Base64 virtual/perl-Storable virtual/perl-Text-Balanced virtual/perl-Time-HiRes !minimal? ( dev-perl/HTML-Template dev-perl/IO-Socket-INET6 >=net-analyzer/rrdtool-1.3[perl] )" # Keep this seperate, as previous versions have had other deps here DEPEND="${DEPEND_COM} virtual/perl-Module-Build java? ( >=virtual/jdk-1.5 ) test? ( dev-perl/Test-LongString dev-perl/Test-Differences dev-perl/Test-MockModule dev-perl/File-Slurp dev-perl/IO-stringy dev-perl/IO-Socket-INET6 )" RDEPEND="${DEPEND_COM} virtual/awk ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) java? ( >=virtual/jre-1.5 || ( net-analyzer/netcat6 net-analyzer/netcat ) ) !minimal? ( virtual/cron media-fonts/dejavu )" S="${WORKDIR}/${MY_P}" pkg_setup() { enewgroup munin enewuser munin 177 -1 /var/lib/munin munin enewuser munin-async -1 /bin/true /var/lib/munin-async java-pkg-opt-2_pkg_setup } src_prepare() { epatch "${WORKDIR}"/patches/*.patch java-pkg-opt-2_src_prepare } src_configure() { local cgidir='$(DESTDIR)/var/www/localhost/cgi-bin' use cgi || cgidir="${T}/useless/cgi-bin" cat - >> "${S}"/Makefile.config <> "${D}"/var/lib/munin/.ssh/config <> "${D}"/usr/share/${PN}/crontab <> "${D}"/usr/share/${PN}/fcrontab <