# Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
pkgname=librtas
pkgver=2.0.2
pkgrel=2
pkgdesc="Run-Time Abstraction Services (RTAS)"
arch=(powerpc64le powerpc64 powerpc)
url="https://github.com/ibm-power-utilities/librtas"
license=('GPL')
depends=(glibc)
makedepends=(git)
source=("${pkgname}-${pkgver}::git+https://github.com/ibm-power-utilities/librtas.git?#tag=v${pkgver}")
md5sums=('SKIP')

prepare() {
	cd "$srcdir/${pkgname}-${pkgver}"
	sh autogen.sh
}

build() {
	cd "$srcdir/${pkgname}-${pkgver}"
	./configure --prefix=/usr
	make
}

check() {
	cd "$srcdir/${pkgname}-${pkgver}"
	make -k check
}

package() {
	cd "$srcdir/${pkgname}-${pkgver}"
	make DESTDIR="$pkgdir/" install
}
