# $Id: Portfile 67359 2010-05-06 13:49:31Z mww@macports.org $

PortSystem 1.0

name			imapsync
version			1.311
categories		mail
platforms		darwin
maintainers		mww
description		imapsync is an IMAP synchronization, copy or migration tool.
long_description	imapsync is an IMAP synchronization, copy or migration \
				tool. Synchronize mailboxes between two imap servers. It is \
				especially good at IMAP migration.

homepage		http://www.linux-france.org/prj/imapsync/
master_sites	${homepage}/dist/ freebsd
extract.suffix	.tgz
checksums           md5     e54860493f00ae86297d32ced91535c5 \
                    sha1    a4eb4f8106745090677f65d9aec0435c19d3ed93 \
                    rmd160  8159560f248eb898f00067cd4fe453421363e600

depends_run		path:bin/perl:perl5 \
				port:p5-digest-md5 \
				port:p5-mail-imapclient \
				port:p5-term-readkey \
				port:p5-io-socket-ssl \
				port:p5-datemanip \
				port:p5-digest-hmac

configure {
	reinplace "s|^#!.*|#!${prefix}/bin/perl|g" ${worksrcpath}/imapsync
}

build			{}

destroot {
	xinstall -m 755 ${worksrcpath}/imapsync ${destroot}${prefix}/bin/imapsync.pl
	system "cd ${destroot}${prefix}/bin && ln -s imapsync.pl imapsync"
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} CREDITS ChangeLog FAQ COPYING INSTALL README \
		TODO VERSION ${destroot}${prefix}/share/doc/${name}
}

livecheck.type	regex
livecheck.url	${homepage}/dist/?M=D
livecheck.regex	${name}-(\[.0-9\]+)\\.tgz
