# $Id: Portfile 93749 2012-05-29 20:53:35Z mww@macports.org $

PortSystem 1.0

name                ftpsync
version             1.3.04
revision            1
categories          net
platforms           darwin
license             GPL-2
maintainers         mww openmaintainer
description         Synchronizes a local and a remote ftp directory tree

long_description    ${description}
homepage            https://www.clazzes.org/projects/ftpsync/
master_sites        http://download.clazzes.org/ftpsync/

checksums           md5     7a34f57716be27d5fe4738e69ddb9e89 \
                    sha1    5d814181343a62019bd8c4bb86587c9c3bf8163e \
                    rmd160  3e0f3eda07b26a427ec7e87194fd56ee51d7ae66

supported_archs     noarch

depends_run         port:p5.12-net port:p5.12-libwww-perl

use_bzip2           yes

configure {
    reinplace "s|/usr/bin/perl|${prefix}/bin/perl5.12|1" ${worksrcpath}/ftpsync.pl
}

build {}

destroot {
    xinstall -m 755 ${worksrcpath}/ftpsync.pl ${destroot}${prefix}/bin
    ln -s ftpsync.pl ${destroot}${prefix}/bin/ftpsync
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0444 -W ${worksrcpath} COPYING Changes README TODO \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       http://download.clazzes.org/ftpsync/
livecheck.regex     ${name}-(\[0-9\\.\]+).tar.bz2
