# $Id: Portfile 79779 2011-06-25 18:59:14Z jmr@macports.org $

PortSystem		1.0

name			freepops
version			0.0.18
revision        1
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		port:curl \
				port:expat \
				port:openssl

patchfiles		patch-darwin

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

use_parallel_build  no
build.args			WHERE=${prefix}/ \
                    H=

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