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

build() {
	# Disable FORTIFY until build is fixed
	export CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"

	scripts/genconfig.sh
	make defconfig
	make
}

check() {
	make test
}

package() {
	install -Dm755 toybox "$pkgdir"/usr/bin/toybox
}

sha512sums="
ec442a65666e2e9dc46b3cd1e49d2c69eae62df9e10ccf15632b75529d4381a3f828b05f48a7e24844d386fd94f015e338705550fb2a1ecc57eb96268515162c  toybox-0.8.11.tar.gz
"
