# -*- 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

PortSystem          1.0

name                time-track-cli
version             1.2
categories          office tcl
platforms           any
maintainers         the-blair.com:blair
supported_archs     noarch

description         Simple time tracking application using the CLI, in the spirit \
                    of todo.txt.

long_description    In the spirit of TODO.TXT, this little Tcl script will handle \
                    tracking how much time you spend on tasks throughout the day. \
                    All records are stored in a plain text file so you're not \
                    dependent on anyone else's format.

homepage            https://github.com/dongola7/Time-Track-CLI
master_sites        http://the-blair.com/sw/time-track-cli

checksums           md5     ea6237ad43af401536322d2403ea1880 \
                    sha1    7c0594cdea36c8485ac008f4db6269e887c09ae1 \
                    rmd160  735e241d57a7814b7ac7f9b04151aec8795b71b9

depends_lib         port:tcl \
                    port:tcllib

extract.mkdir       yes

use_configure       no

build {}

destroot {
    # Install time_track.tcl
    xinstall -m 755 ${worksrcpath}/time_track.tcl ${destroot}${prefix}/bin

    # Install example hooks
    file mkdir ${destroot}${prefix}/share/doc/${name}/hooks
    foreach hook_file [glob ${worksrcpath}/*.sample] {
        file copy $hook_file ${destroot}${prefix}/share/doc/${name}/hooks
    }

    # Install documentation
    file copy ${worksrcpath}/README.html ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)\\.tar
