# $Id: Portfile 58528 2009-09-30 10:29:33Z ryandesign@macports.org $

PortSystem 1.0
name	   	watch
version	    	3.2.8
categories  	sysutils
maintainers 	yahoo.com:mjhsieh
description    	watch executes a program periodically, showing output fullscreen
long_description	watch is like "top" for arbitrary commands. It runs \
			command repeatedly, displaying its output (the first \
			screen full). This  allows you to watch the program \
			output change over time. This is part of the  linux \
			"procps" package

homepage	http://sourceforge.net/projects/procps/
master_sites	http://procps.sourceforge.net/
distname	procps-${version}
platforms	darwin
checksums	md5 9532714b6846013ca9898984ba4cd7e0 \
		sha1 a0c86790569dec26b5d9037e8868ca907acc9829

use_configure	no

depends_lib	port:ncurses

build.target	watch
build.args	CC=${configure.cc} \
		LDFLAGS="${configure.ldflags}" \
		PKG_LDFLAGS=""

pre-build {
    build.args-append   CPPFLAGS="[exec ${prefix}/bin/ncurses5-config --cflags]"
}

destroot	{ 
	xinstall -m 0755 ${worksrcpath}/watch ${destroot}${prefix}/bin
	xinstall -m 0644 ${worksrcpath}/watch.1 \
		${destroot}${prefix}/share/man/man1
}
