# $Id$

PortSystem		1.0

name			mb2md
version			3.20
revision        2
categories		mail
license			public-domain
maintainers		nomaintainer
description		Script for converting Mbox mailboxes to Maildir format
long_description	Perl script that takes one or more Mbox format \
					mailbox files in a directory and convert them to \
					Maildir format mailboxes.  It also converts the \
					mailspool file.  It is smart enough to not transfer \
					a dummy message such as the UW IMAPD puts at the \
					start of Mbox mailboxes - and you could add your own \
					search terms into the script to make it ignore other \
					forms of dummy first message.
homepage		http://batleth.sapienti-sat.org/projects/${name}
master_sites	${homepage}
distfiles		${name}-${version}.pl.gz
checksums		md5 b47eaa6ae4231a42f4a15564a08eb439
platforms		darwin
supported_archs	noarch

depends_run		port:perl5.16 \
				port:p5.16-timedate

pre-extract		{ file mkdir ${worksrcpath} }
extract.post_args	">${worksrcpath}/${name}-${version}.pl"

patchfiles		patch-${name}

use_configure	no

build {
	file copy ${worksrcpath}/${name}-${version}.pl ${worksrcpath}/${name}
	reinplace "s|^#!.*perl|#!${prefix}/bin/perl5.16|" ${worksrcpath}/${name}
}

destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/bin
	xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
}