# $Id: Portfile 78632 2011-05-14 22:50:58Z ryandesign@macports.org $

PortSystem 			1.0
PortGroup 			cmake 1.0 

name 				task
version 			1.9.4
maintainers 		mnick

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           md5     0c5d9dedb1ead69590af895d16708070 \
                    sha1    b9bae255f4fa03970eced3ac0876935271d1d7a1 \
					rmd160  4f17bfd08d94fc2c9c2da74a2fe0a7322d15623d 

depends_lib-append 		port:lua 

post-destroot {
	if {[variant_isset bash_completion]} {
        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
        copy ${worksrcpath}/scripts/bash/task_completion.sh ${destroot}${prefix}/etc/bash_completion.d/task
    }

    if {[variant_isset zsh_completion]} {
        set site-functions ${destroot}${prefix}/share/zsh/site-functions
        xinstall -d ${site-functions}
        xinstall ${worksrcpath}/scripts/zsh/_task ${site-functions}/_task
    }
}

variant bash_completion {
    depends_run-append  port:bash-completion
}

variant zsh_completion description {Install mercurial zsh completion file} {
    depends_run-append path:${prefix}/bin/zsh:zsh
}

livecheck.type 	regex 
livecheck.url 	${homepage}/wiki/taskwarrior/Download
livecheck.regex Latest stable release: (.*)<a href
