# Maintainer: André Klitzing <aklitzing@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
pkgname=toybox
pkgver=0.7.6
pkgrel=0
pkgdesc="A BSD-licensed alternative to busybox"
arch="all"
license="BSD"
url="https://landley.net/toybox/"
depends="attr"
makedepends="bash linux-headers"
subpackages="$pkgname-doc"
source="https://landley.net/${pkgname}/downloads/${pkgname}-${pkgver}.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	make defconfig
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"

	#chmod 755 toybox
	#make PREFIX="$pkgdir" install

	install -Dm755 toybox "$pkgdir"/bin/toybox
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="1ed06114f5feb46e642bfeee517366a16c0a5d76562841a3cdf6b003bb330be10d4ac5009c7cf845eb5ea99bb8ae8b4291c413bbd45fd89c2ae3e4a69c1455bb  toybox-0.7.6.tar.gz"
