# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem 1.0

name              wait_on
version           1.1
categories        sysutils
platforms         darwin
maintainers       webfinish.com:kirk
description       waits until a file or directory is changed
long_description  utility that will wait until a file is created, changed, or deleted \
    using kqueue.  Provides a timeout to wait for changes.  
license           GPLv2

homepage          http://www.freshports.org/sysutils/wait_on/
master_sites      http://freebsd.unixfreunde.de/sources/
checksums         md5    6b5917ad6136fdd8295d2d1299db10d5 \
                  sha1   9e3fb51b6324f5aca7664fb8165f61a52bd5bd61 \
                  rmd160 5d14c616c805cef7d369b6fcb6c0377ba1d8ef1d

use_configure     no
worksrcdir        ${workpath}/${name}


build {
  exec echo cd ${worksrcdir} > doit.sh
  exec echo gcc -o wait_on wait_on.c >> doit.sh
  exec chmod +x doit.sh
  exec ./doit.sh
  exec rm doit.sh
}

destroot {
    xinstall -m 755 ${worksrcdir}/${name} ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcdir}/${name}.1 ${destroot}${prefix}/share/man/man1
}

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