# $Id: Portfile,v 1.6 2006/01/23 11:44:42 pguyot Exp $

PortSystem			1.0
name				stunnel
version				4.14
categories			security net
maintainers			pguyot@kallisys.net
description			SSL tunneling program
long_description	Stunnel is a program that allows you to encrypt arbitrary \
					TCP connections inside SSL (Secure Sockets Layer) available \
					on both Unix and Windows. Stunnel can allow you to secure \
					non-SSL aware daemons and protocols (like POP, IMAP, LDAP, \
					etc) by having Stunnel provide the encryption, requiring no \
					changes to the daemon's code.
platforms			darwin
homepage			http://www.stunnel.org/
master_sites		${homepage}download/stunnel/src/
checksums			md5 0969cc4868dfd75f22792ecccc9ec555 \
					sha1 b2edb3a2473367f2a9f04a877adcb332483a5267 \
					rmd160 ece1c26dcddf6546e428fcc626a45c06f4757d67
depends_lib			bin:openssl:openssl
patchfiles			patch-tools-stunnel.cnf
configure.args		--mandir=${prefix}/share/man

post-destroot {
	# Create the ${prefix}/var/run directory.
	xinstall -d -m 770 "${destroot}${prefix}/var/run"
	system "touch ${destroot}${prefix}/var/run/.turd"

	# Tell the user about the stupid fake certificate that we provide.
	ui_msg "A fake certificate has been installed as ${prefix}/etc/stunnel/stunnel.pem"
}
