# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 55564 2009-08-13 13:55:12Z snc@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                timedrive
version             0.1.1
categories          sysutils net
maintainers         snc
description         incremental backup across networks
long_description    Time Drive is a front-end utility for duplicity. It makes \
                    backup to an external file server easy and efficient. Time \
                    Drive supports WebDAV, secure WebDAV, FTP, SSH, and SCP. \
                    It can also be configured to work with Samba.

homepage            http://www.oak-tree.us/blog/index.php/science-and-technology/time-drive

platforms           darwin
depends_build-append \
                    port:py26-pyqt4 \
                    port:py26-sip \
                    port:py26-setuptools
depends_lib-append  port:duplicity
depends_run-append  port:sshfs \
                    port:ncftp

master_sites        http://www.oak-tree.us/stuff/
distname            Time-Drive-${version}
use_zip             yes

checksums           md5     e0436173fccc079079c3cc303dcc0851 \
                    sha1    6253c728a69d88c4665c71c0a247351784eaeeb1 \
                    rmd160  81c7f7c8fbf442442721efcb61509be2274f3898

worksrcdir          Time-Drive

patch {
    reinplace s|pyrcc4|pyrcc4-2.6|g ${worksrcpath}/BuildUi.sh
    reinplace s|pyuic4|pyuic4-2.6|g ${worksrcpath}/BuildUi.sh
    file attributes ${worksrcpath}/BuildUi.sh -permissions +x
    file copy ${filespath}/setup.py ${worksrcpath}/
    reinplace s|backends|backend|g ${worksrcpath}/duplicity_interface.py
}

pre-build {
    system "cd ${worksrcpath} && ./BuildUi.sh"
}

livecheck.check     regex
livecheck.url       ${homepage}
livecheck.regex     Time Drive \\((\\d+\\.\\d+\\.\\d+)\\)
