# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="A small daemon to collect system statistics into RRD files." HOMEPAGE="http://verplant.org/collectd/" SRC_URI="http://verplant.org/collectd/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="lm_sensors statgrab hddtemp highres" DEPEND=" >=net-analyzer/rrdtool-1.2 hddtemp? ( >=app-admin/hddtemp ) lm_sensors? ( >=sys-apps/lm_sensors-2.9.0 ) statgrab? ( >=sys-libs/libstatgrab-0.10 ) " src_unpack() { unpack "${A}" cd "${S}" epatch ${FILESDIR}/pidfile-${PV}.patch if use highres; then epatch ${FILESDIR}/highres-${PV}.patch fi } src_compile() { local myopts='' use lm_sensors \ && myopts="${myopts} --with-lm-sensors" \ || myopts="${myopts} --without-lm-sensors" use statgrab \ && myopts="${myopts} --with-libstatgrab" \ || myopts="${myopts} --without-libstatgrab" ./configure \ --prefix=/usr \ --host=${CHOST} \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --datadir=/usr/share \ --sysconfdir=/etc \ --localstatedir=/var \ ${myopts} || die "configure failed" emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die install failed dodoc AUTHORS ChangeLog README NEWS TODO docinto contrib dodoc contrib/* docinto contrib/museum dodoc contrib/museum/* keepdir /var/lib/collectd exeinto /etc/init.d newexe ${FILESDIR}/${P}.initd collectd insinto /etc/conf.d newins ${FILESDIR}/${P}.confd collectd }