# $Id: Portfile,v 1.7 2006/07/27 07:04:32 yeled Exp $

PortSystem			1.0
name				stunnel
version				4.15
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 2c00153ad099a5f9c5609e8d1dbbe470 \
					sha1 735406c1ca94904581158a434214e1f6568539d0 \
					rmd160 a8d5c9d3fb24d0518975cbb347729f5eba3d3f12
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"
}
