# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="rsnapgraph is a utility that will analyze the snapshot backups created by rsnapshot" HOMEPAGE="http://denism.homeip.net/software/rsnapgraph.html" SRC_URI="http://denism.homeip.net/software/rsnapgraph/${P}.tar.gz" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="" RDEPEND=">=dev-lang/perl-5.8.6 >=app-backup/rsnapshot-1.2.1 >=media-gfx/gnuplot-4.0-r1" pkg_setup() { if ! built_with_use media-gfx/gnuplot png ; then echo eerror eerror "gnuplot is missing png support." eerror einfo einfo "Please add 'media-gfx/gnuplot png' in /etc/portage/package.use" einfo "and re-emerge gnuplot." einfo die "gnuplot needs png support" fi } src_unpack() { unpack ${A} cd "${S}" #Gentoofying the configuration file sed -i -e 's:#workdir=/var/cache/rsnapgraph:workdir=/var/cache/rsnapgraph:' \ rsnapgraph.conf || die "sed failed" sed -i -e 's:#graphdir=/var/www/rsnapgraph:#graphdir=/var/www/localhost/htdocs:' \ rsnapgraph.conf || die "sed failed" } src_compile() { einfo "Nothing to compile" } src_install() { newbin rsnapgraph rsnapgraph dodoc CHANGES README TODO insinto /etc doins rsnapgraph.conf keepdir /var/cache/rsnapgraph fperms 700 /var/cache/rsnapgraph }