# $Id: Portfile,v 1.2 2005/04/08 16:32:41 toby Exp $

PortSystem 1.0

name			p0f
version			2.0.5
categories		net security
platforms		darwin
maintainers		mww@opendarwin.org
description		versatile passive OS fingerprinting, masquerade detection tool
long_description	p0f is a versatile passive OS fingerprinting and \
				masquerade detection utility, to be used for evidence or \
				information gathering on servers, firewalls, IDSes, and \
				honeypots, for pen-testing, or just for the fun of it.

homepage		http://lcamtuf.coredump.cx/p0f.shtml
master_sites	http://lcamtuf.coredump.cx/p0f/
extract.suffix	.tgz
checksums		md5 78235749e8ada6ad2b16b40fe15081f6

depends_build	bin:gmake:gmake

worksrcdir		p0f

patchfiles      patch-mk__Linux

configure	{
	reinplace "s|/etc/p0f|${prefix}/share/p0f|g" ${worksrcpath}/config.h
}

build.cmd		sh Build
build.target

destroot	{
	xinstall -m 755 -s ${worksrcpath}/p0f ${destroot}${prefix}/bin
	xinstall -m 644 ${worksrcpath}/p0f.1 ${destroot}${prefix}/share/man/man1
	system "gzip -9 ${destroot}${prefix}/share/man/man1/p0f.1"
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
		${destroot}${prefix}/share/${name}
	xinstall -m 644 -W ${worksrcpath} p0f.fp p0fa.fp p0fr.fp p0fo.fp \
		${destroot}${prefix}/share/${name}
	xinstall -m 644 -W ${worksrcpath}/doc COPYING CREDITS ChangeLog KNOWN_BUGS \
		README TODO ${destroot}${prefix}/share/doc/${name}
}
