# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: João Vitor S. Anjos <jvanjos at protonmail dot com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=stress
pkgver=1.0.7
pkgrel=1
pkgdesc="A tool that stress tests your system (CPU, memory, I/O, disks)"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/resurrecting-open-source-projects/stress"
license=('GPL')
options=('!emptydirs')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha512sums=('93d5d8708a0abbc7d85585a37cd6085362d3dca7d49d2915c09e7bc151296c4023e2cedd5e190578f7540e666280ba16b4e9a7aa0133f35dde598446252fdccb')
validpgpkeys=(BB1838728F40B7E63BFCD67AE52707E90485EFCD)

build() {
  cd "${pkgname}-${pkgver}"
  ./autogen.sh
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm644 README.md ChangeLog AUTHORS -t "${pkgdir}/usr/share/doc/${pkgname}"
}
