inherit perl-module flag-o-matic gnuconfig eutils DESCRIPTION="helper scripts to aid in building RRD data and graphs" HOMEPAGE="http://www.rediris.es/app/rrdUtils/" SRC_URI="ftp://ftp.rediris.es/rediris/software/rrdUtils/${P}.tar.gz" LICENSE="GPL-2" KEYWORDS="x86 ppc sparc alpha hppa amd64 ~ia64" IUSE="snmp" DEPEND="dev-lang/perl net-analyzer/rrdtool sys-apps/sed " S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd ${S} } src_compile() { local myconf myconf="${myconf} --with-rrddir=/var/lib/rrd --prefix=/usr" econf ${myconf} || die "econf failed" } src_install() { # what's the best way to snag the right site_perl dir with a module # that's doesn't have a Makefile.PL ? PERLLIB=$(perl -e 'printf "%s", (grep /site_perl$/, @INC)[0]') make DESTDIR=${D} PERLLIB=$PERLLIB install || die dodoc ChangeLog DESCRIPTION EXAMPLES INSTALL README ToDo use snmp && dodoc README.snmp snmp-kit/table_db.patch use snmp && make DESTDIR=${D} install-snmp insinto /usr/share/doc/${PF}/examples doins examples.dir/* insinto /usr/share/doc/${PF}/contrib doins contrib/* mkdir -p ${D}/var/lib/rrd/{conf,data,graphs} touch ${D}/var/lib/rrd/{conf,data,graphs}/.keep }