# $Id: Portfile,v 1.2 2005/08/11 21:33:21 rshaw Exp $
PortSystem		1.0

name			freepops
version			0.0.18
categories		mail
maintainers		darwinports@opendarwin.org
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 {
	cd ${worksrcpath}
	file copy ${filespath}/${name}.sh.in ${name}.sh
	reinplace "s%@PREFIX@%${prefix}%g" \
		${name}.sh \
		configure.sh \
		doc/freepopsd.1 \
		src/freepops.h \
		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
}

