# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=entr
pkgver=3.9
pkgrel=0
pkgdesc="Event Notify Test Runner: Run arbitrary commands when files change"
url="http://entrproject.org"
arch="all"
license="ISC BSD"
subpackages="$pkgname-doc"
makedepends="vim mercurial file util-linux"
checkdepends="bash tmux"
source="http://entrproject.org/code/$pkgname-$pkgver.tar.gz
	"
builddir="$srcdir/eradman-$pkgname"

unpack() {
	default_unpack

	# Top-level directory inside the tar archive contains SHA of a commit...
	mv "$srcdir"/eradman-$pkgname-* "$builddir"
}

build() {
	cd "$builddir"
	./configure
	make
}

package() {
	cd "$builddir"
	PREFIX="$pkgdir/usr" make install
}

check() {
	cd "$builddir"
	make test

	# FIXME: The tmux invocation in the functional tests blocks the builders
	# make regress
}

sha512sums="e0d58b7f4dc20ba9cfb12a165172817dfd647e859e2133b01b59427f9bb9612ee5b8e8f6563f31cc15b57251e60b2cb639c764f65d6daeb4456ecbccc7b39c12  entr-3.9.tar.gz"
