# $Id: Portfile,v 1.7 2006/04/02 16:34:01 markd Exp $

PortSystem	1.0

name				mrtg   
version				2.13.2

categories			net
maintainers			opendarwin.org@darkart.com jberry@opendarwin.org
platforms			darwin

description			The multi-router traffic grapher
long_description	MRTG is a tool to monitor the traffic load on network-links. \
					It can also be used to gather and display a wide variety of time-series data.
homepage			http://www.mrtg.org/
					
master_sites		http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/ \
					ftp://ftp.chg.ru/pub/networking/monitoring/mrtg/
checksums			md5 daab44b14d608cda831b4dc481cec38a \
					sha1 d8b049658e04bbbb7784d7a23ad295b13829e55a

depends_lib			port:gd2 \
					port:libpng \
					port:zlib

configure.env		LDFLAGS="-L${prefix}/lib" \
					CPPFLAGS="-I${prefix}/include"
configure.args		--mandir=${prefix}/share/man \
					--with-gd=${prefix} \
					--with-z=${prefix} \
					--with-png=${prefix}

post-destroot {
	destroot.keepdirs \
		${destroot}${prefix}/var/run \
		${destroot}${prefix}/var/log \
		${destroot}${prefix}/var/cache/mrtg
		
	reinplace s|"/var|"${prefix}/var| ${destroot}${prefix}/bin/mrtg
	reinplace s|"/etc|"${prefix}/etc| ${destroot}${prefix}/bin/mrtg
}

