# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=stress-ng
pkgver=0.18.07
pkgrel=0
pkgdesc="stress-ng will stress test a computer system in various selectable ways"
url="https://github.com/ColinIanKing/stress-ng"
arch="all"
license="GPL-2.0-or-later"
options="!check" # tests are not portable
makedepends="
	judy-dev
	libaio-dev
	libbsd-dev
	linux-headers
	lksctp-tools-dev
	zlib-dev
	"
subpackages="$pkgname-doc $pkgname-bash-completion"
source="$pkgname-$pkgver.tar.gz::https://github.com/ColinIanKing/stress-ng/archive/refs/tags/V$pkgver.tar.gz"

build() {
	export CFLAGS="${CFLAGS/-Os/-O2}"
	make
}

package() {
	make DESTDIR="$pkgdir" \
		JOBDIR="/usr/share/doc/$pkgname/example-jobs/" install
}

sha512sums="
359c88567b6a8e8fc743d6eacaef01d4a472748147fc044b9382abfd4ef75e3bcb625a9bed151db38b0f9ad48fd907a4373f1b7624c26f9c20d331046c3a57d8  stress-ng-0.18.07.tar.gz
"
