# $Id: Portfile 32830 2008-01-14 04:53:04Z ryandesign@macports.org $
PortSystem		1.0

name			freepops
version			0.0.18
categories		mail
maintainers		nomaintainer
description		extensible program for webmail access via POP3 protocol
long_description	FreePOPs is an easily extensible program, which \
					allows to have an  access to the most varied \
					resources through the POP3 protocol.  Mainly, it can \
					be used to download mail from the most famous \
					webmails,  but it could also be used as an \
					aggregator for RSS feeds and many  more. This way it \
					is possible to get all your messages in your \
					favourite email client.
homepage		http://freepops.sourceforge.net/en/
master_sites	sourceforge
checksums		md5 71268cb9b05549be3db271014bcea5ca
platforms		darwin

depends_lib		lib:libcurl.2:curl \
				lib:libexpat:expat \
				lib:libcrypto.0.9:openssl \
				lib:libz.1:zlib

patchfiles		patch-darwin

pre-configure {
	file copy ${filespath}/${name}.sh.in ${worksrcpath}/${name}.sh
	reinplace "s%@PREFIX@%${prefix}%g" \
		${worksrcpath}/${name}.sh \
		${worksrcpath}/configure.sh \
		${worksrcpath}/doc/freepopsd.1 \
		${worksrcpath}/src/freepops.h \
		${worksrcpath}/src/lua/freepops.lua
}
configure.cmd		./configure.sh
configure.pre_args	osx

build.args			WHERE=${prefix}/

destroot.args		WHERE=${prefix}/
post-destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
	xinstall -m 0755 ${worksrcpath}/${name}.sh ${destroot}${prefix}/etc/rc.d
}

