# $Id: Portfile,v 1.22 2006/05/22 04:46:08 ricci Exp $
PortSystem 1.0

name			net-snmp
version			5.3.0.1
revision		1
categories		net
maintainers		opendarwin.org@darkart.com
description		An extendable SNMP implementation
long_description	This is net-snmp, a derivative of CMU's SNMP \
					package. Various tools relating to the Simple \
					Network Management Protocol including: an extensible \
					agent, an SNMP library, tools to request or set \
					information from SNMP agents, tools to generate and \
					handle SNMP traps, a version of the unix 'netstat' \
					command using SNMP, a Tk/perl MIB browser.
homepage		http://net-snmp.sourceforge.net/
platforms		darwin
master_sites		sourceforge
checksums		md5 db5995ff8fae154cbe7417a4a6f2ca60 \
			sha1 c58ddabe4281c3681a268bd48de6865e812f2ec5 \
			rmd160 86b7e56b512faf73d2a08ac3df2def4560b62945

depends_build		path:/usr/include/netinet/ip_var.h:netinet-headers
patchfiles		patch-Makefile.in \
			patch-agent.mibgroup.host.hr_storage.c
depends_lib		port:openssl \
			port:zlib
configure.args		--enable-shared --disable-static --with-defaults \
				--disable-agent \
				--with-sys-contact=nobody@no.where \
				--with-persistent-directory=${prefix}/var/net-snmp \
				--mandir=${prefix}/share/man \
				--infodir=${prefix}/share/info \
				--with-logfile=${prefix}/var/log \
				--with-openssl=${prefix} --with-zlib=${prefix} \
				--with-install-prefix=${destroot}

variant no_ssl {
	configure.args-delete --with-openssl=${prefix}
	configure.args-append --without-openssl
}

variant no_zlib {
	configure.args-delete --with-zlib=${prefix}
	configure.args-append --without-zlib
}

variant bzip2 {
	configure.args-append --with-bzip2=${prefix}
}

variant server	{
	depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
	configure.args-delete	--disable-agent
}

variant ipv6	{ configure.args-append --enable-ipv6 }

## add in support for kerb based SNMP security
variant ksm	{ configure.args-append --with-security-modules="usm ksm" }

## destroot.destdir	prefix=${destroot}${prefix} \
## 			exec_prefix=${destroot}${prefix}
post-destroot	{ destroot.keepdirs ${destroot}${prefix}/var/net-snmp }

