234
|
1 # Copyright 1999-2010 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
|
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/mrtg/mrtg-2.16.2-r1.ebuild,v 1.1 2010/05/29 04:48:18 pva Exp $
|
|
4
|
|
5 EAPI="3"
|
|
6
|
|
7 DESCRIPTION="A tool to monitor the traffic load on network-links"
|
|
8 HOMEPAGE="http://oss.oetiker.ch/mrtg/"
|
|
9 SRC_URI="http://oss.oetiker.ch/mrtg/pub/${P}.tar.gz"
|
|
10
|
|
11 LICENSE="GPL-2"
|
|
12 SLOT="0"
|
|
13 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
|
|
14 IUSE=""
|
|
15
|
|
16 DEPEND="dev-lang/perl
|
|
17 dev-perl/SNMP_Session
|
|
18 >=media-libs/gd-1.8.4"
|
|
19
|
|
20 src_prepare() {
|
|
21 rm ./lib/mrtg2/{SNMP_{Session,util},BER}.pm || die
|
|
22 }
|
|
23
|
|
24 src_install () {
|
|
25 keepdir /var/lib/mrtg
|
|
26
|
|
27 emake DESTDIR="${ED}" install || die "emake install failed"
|
|
28 mv "${ED}/usr/share/doc/"{mrtg2,${PF}}
|
|
29
|
|
30 newinitd "${FILESDIR}/mrtg.rc" ${PN} || die
|
|
31 newconfd "${FILESDIR}/mrtg.confd" ${PN} || die
|
|
32 }
|
|
33
|
|
34 pkg_postinst(){
|
|
35 elog "You must configure mrtg before being able to run it. Try cfgmaker."
|
|
36 elog "The following thread may be useful:"
|
|
37 elog "http://forums.gentoo.org/viewtopic-t-105862.html"
|
|
38 }
|