# $Id: Portfile 57502 2009-09-11 19:52:23Z ryandesign@macports.org $

PortSystem 1.0

name		ssmtp
version		2.61
revision	1
categories	mail
maintainers	nomaintainer
description	Sendmail alternative for small routers (outgoing mail only)
long_description	This is sSMTP, a program that replaces sendmail on workstations that \
			should send their mail via the departmental mailhub from which they pick up \
			their mail (via pop, imap, rsmtp, pop_fetch, NFS... or the like).  This \
			program accepts mail and sends it to the mailhub, optionally replacing the \
			domain in the From: line with a different one.
platforms	darwin freebsd
master_sites	http://ftp.debian.org/debian/pool/main/s/${name}/ \
		ftp://ftp.icm.edu.pl/pub/Linux/debian/pool/main/s/${name}/
distfiles	${name}_${version}.orig${extract.suffix}
checksums	md5 957e6fff08625fe34f4fc33d0925bbc9

depends_lib	port:openssl

patchfiles	patch-ssmtp.c patch-generate_config patch-Makefile.in patch-configure.in

use_autoconf yes
configure.args	--enable-ssl

destroot.destdir prefix=${destroot}${prefix} \
                 mandir=${destroot}${prefix}/share/man/man8

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -W ${worksrcpath} README INSTALL COPYING \
		${destroot}${prefix}/share/doc/${name}

	xinstall ${worksrcpath}/ssmtp.conf ${destroot}${prefix}/etc/${name}/ssmtp.conf.sample
}
