# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:sts=4
# $Id: Portfile 106752 2013-06-07 08:37:30Z g5pw@macports.org $

PortSystem          1.0

name                vit
version             1.1
maintainers         g5pw openmaintainer
categories          office
description         Vit is a full-screen terminal interface for Taskwarrior
long_description    ${description} with Vi key bindings and complete support \
                    for native Taskwarrior colorization.

platforms           darwin
supported_archs     noarch

homepage            http://taskwarrior.org/projects/1/wiki/Vit

master_sites        http://taskwarrior.org/attachments/606/

checksums           rmd160  0a80ff4b8b305f6776c2c7f34e7c3fe0ca59b8c3 \
                    sha256  9b8cce2447b1d8247c6e6317b75dc76daf4f0f30a2a8160755c3befeafc8c6be

depends_lib         port:task \
                    port:p5.12-curses

patchfiles          configure.patch \
                    vit.pl.patch

configure.perl      ${prefix}/bin/perl5.12

build.target

destroot {
    xinstall -m 775 ${worksrcpath}/vit ${destroot}${prefix}/bin/
    xinstall -m 664 ${worksrcpath}/commands ${destroot}${prefix}/etc/vit-commands

    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -W ${worksrcpath} README LICENSE CHANGES TODO taskrc-gtk+ \
                ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
