# Maintainer: Christian Kampka <christian@kampka.net>
pkgname=roundup
pkgver=0.0.6
pkgrel=1
pkgdesc="A a unit testing tool for running roundup(5) test plans which are
written in any POSIX shell."
url=https://github.com/bmizerany/roundup/
arch="all"
license="MIT"
depends=
makedepends="ncurses"
source="$pkgname-$pkgver.tar.gz::https://github.com/bmizerany/$pkgname/archive/v$pkgver.tar.gz
  $pkgname-fix-busybox-shell-opts.patch
  $pkgname-avoid-bash-syntax-in-tests.patch
  "

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
  #patches
  cd "$_builddir"
  for i in $source; do
    local p=${i##*/}
    case $i in
      *.patch) msg $p; patch -p1 -i "$srcdir"/$p || return 1;;
    esac
  done
}

build() {
  cd $_builddir
  /bin/sh roundup.sh roundup-1-test.sh
}

package() {
  install -Dm755 $_builddir/roundup.sh $pkgdir/usr/bin/$pkgname
}

md5sums="607023b4fe4e42fdc2f0cb14b4138b2e  roundup-0.0.6.tar.gz
a7d12efbf88919a1e2fc9b7ed143fd9c  roundup-fix-busybox-shell-opts.patch
dddd5610d03f2c1237c295c564c291c4  roundup-avoid-bash-syntax-in-tests.patch"
sha256sums="20741043ed5be7cbc54b1e9a7c7de122a0dacced77052e90e4ff08e41736f01c  roundup-0.0.6.tar.gz
31e00fc54fa806aaa1a3199dd13b596b36e8f57685c7524db125bf87a949845b  roundup-fix-busybox-shell-opts.patch
e8829b4459a5e3d65949e564cf69e307e7b6fe11758d9becc9426a164bb4a812  roundup-avoid-bash-syntax-in-tests.patch"
sha512sums="a7a249d16467bd3835d555288ec6c3d84a36f2f7f2ae5da90e7624bc76a7741788499fd635d3001c086923914870392c23d765ca07ab7c97e58b9deec9989827  roundup-0.0.6.tar.gz
13cf848227958e83fabf6cde96e1ac347199ad107d6a5daa07e23a976cc8613a0368447295afb310a817c8d6aeb52b96d12d58984a929114decc2c16098ddd7c  roundup-fix-busybox-shell-opts.patch
526cca7805fb55de24df79482e3daa2253fc26db2db662229894b8ad56e79a8a45ad716e0c0241765455bda0a4c45344a9ea7c001860d3f8ca41f0c00e3954f9  roundup-avoid-bash-syntax-in-tests.patch"