# -*- 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                ts
conflicts           moreutils
version             1.0
categories          sysutils
maintainers         {mps @Schamschula} openmaintainer
platforms           darwin
license             GPL-2+

description         ts is a Unix batch system where the tasks spooled run one after \
                    the other.

long_description    task spooler is a Unix batch system where the tasks spooled run \
                    one after the other. The amount of jobs to run at once can be set \
                    at any time. Each user in each system has his own job queue. The \
                    tasks are run in the correct context (that of enqueue) from any \
                    shell/process, and its output/results can be easily watched. \
                    It is very useful when you know that your commands depend on a \
                    lot of RAM, a lot of disk use, give a lot of output, or for \
                    whatever reason it's better not to run them all at the same \
                    time, while you want to keep your resources busy for maximum \
                    benfit. Its interface allows using it easily in scripts.

homepage            http://vicerveza.homeunix.net/~viric/soft/ts/
master_sites        ${homepage}

checksums           rmd160  263e62f159260828d4d449b3ac42517e8f32a814 \
                    sha256  4f53e34fff0bb24caaa44cdf7598fd02f3e5fa7cacaea43fa0d081d03ffbb395

patchfiles          patch-Makefile.diff

use_configure       no

variant universal   {}

build.args          CC="${configure.cc} [get_canonical_archflags cc]"

destroot.args       PREFIX=${prefix}

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        Changelog \
        COPYING \
        OBJECTIVES \
        TRICKS \
        ${destroot}${docdir}
}

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