# $Id: Portfile 106651 2013-06-03 13:14:25Z g5pw@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                task
version             2.2.0
revision            2
maintainers         nomaintainer

categories          office
description         Taskwarrior is an ambitious project to supercharge task management
long_description    ${description} \
                    with an interactive interface, GTD features, color themes, data synch, \
                    dependencies, custom reports, charts, and Lua plugins

platforms           darwin
license             GPL-2

homepage            http://taskwarrior.org/
master_sites        http://www.taskwarrior.org/download/

checksums           rmd160  286c67655b217058f26dcafc98693599a00cce88 \
                    sha256  39e25dd285e6bc8474337a5868cb2ec55675978fa1f08c802e6da58b4181ee14

depends_lib-append  port:lua

post-destroot {
    # Install bash completions
    xinstall -d ${destroot}${prefix}/share/bash-completion/completions
    xinstall ${worksrcpath}/scripts/bash/task.sh ${destroot}${prefix}/share/bash-completion/completions/task

    # Install zsh completions
    set site-functions ${destroot}${prefix}/share/zsh/site-functions
    xinstall -d ${site-functions}
    xinstall ${worksrcpath}/scripts/zsh/_task ${site-functions}/_task

    # Install vim runtime files
    set vim-files ${destroot}${prefix}/share/vim
    xinstall -d ${vim-files}
    move ${worksrcpath}/scripts/vim ${vim-files}/vimfiles
}

livecheck.type  regex
livecheck.url   ${homepage}/projects/taskwarrior/wiki/Download
livecheck.regex ${name}-(\\d(?:\\.\\d)+)\\.tar
