# $Id: Portfile,v 1.5 2005/10/18 20:20:20 blb Exp $

PortSystem 1.0

name		tpop3d
version		1.5.3
revision	2
categories	mail
platforms	darwin
maintainers	mww@opendarwin.org
description	tpop3d is a fast, extensible, secure UNIX POP3 server
long_description	${description}

homepage	http://www.ex-parrot.com/~chris/tpop3d/
master_sites	${homepage}
checksums	md5 dd920c49f4e5879eb3caf7ea047622e9

depends_lib	lib:libssl:openssl


configure.args	--enable-auth-pam \
		--enable-auth-passwd \
		--enable-tls \
		--enable-tcp-wrappers \
		--mandir=${prefix}/share/man
configure.env	LDFLAGS="-lcrypto"

post-destroot	{
	xinstall -d -m 755 ${destroot}${prefix}/etc \
		${destroot}${prefix}/share/doc/${name} \
		${destroot}${prefix}/var/spool/${name}
	xinstall -m 644 ${worksrcpath}/darwin/tpop3d.conf.example \
		${destroot}${prefix}/etc
	xinstall -m 644 -W ${worksrcpath} CHANGES COPYING CREDITS FAQ HACKING \
	INSTALL PORTABILITY README README.POP-before-SMTP README.auth_mysql \
	README.darwin TODO ${destroot}${prefix}/share/doc/${name}
	destroot.keepdirs ${destroot}${prefix}/var/spool/${name}
}

variant darwin {
	patchfiles-append	patch-configure patch-auth_pam.c
}

