# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Daemon which collects system statistics to RRD files" HOMEPAGE="http://collectd.org" SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc ~x86 ~amd64" IUSE="mysql apache2 rrdtool lm_sensors perl hddtemp kernel_linux" DEPEND="virtual/libc virtual/libpcap lm_sensors? ( >=sys-apps/lm_sensors-2.10 ) rrdtool? ( >=net-analyzer/rrdtool-1.2 ) apache2? ( >=net-misc/curl-7.15 ) hddtemp? ( app-admin/hddtemp ) mysql? ( >=dev-db/mysql-5.0 ) perl? ( >=sys-devel/libperl-5.8 )" RDEPEND="${DEPEND}" src_compile () { # We do not need libiptc when building under Linux. Moreover, letting # collectd build against libiptc.a (included in some amd64 stages) # linking will break horribly. # local iptc="--with-libiptc=/usr" if use kernel_linux ; then iptc="--without-libiptc" fi econf \ $(use_with rrdtool) \ $(use_with mysql libmysql) \ $(use_with apache2 libcurl) \ $(use_enable perl) \ $(use_enable apache2 apache) \ $(use_enable lm_sensors sensors) \ $(use_enable kernel_linux getifaddrs) \ --localstatedir="/var" \ --enable-daemon \ --enable-quota \ --disable-apcups \ ${iptc} emake } src_install () { einstall dodoc README AUTHORS ChangeLog NEWS TODO docinto contrib dodoc contrib/* keepdir /var/lib/collectd newinitd "${FILESDIR}/${PN}.initd" ${PN} newconfd "${FILESDIR}/${PN}.confd" ${PN} } pkg_postinst () { einfo "collectd introduced some changes in the new 4.x series." einfo "For further information, read http://collectd.org/migrate-v3-v4.shtml" einfo "The migration script can be found at:" einfo "/usr/share/doc/${P}/contrib/migrate-3-4.px.bz2" }