# Maintainer: Breno Leitao <breno.leitao@gmail.com>
pkgname=iprutils
pkgver=2.4.15
pkgrel=1
pkgdesc="user space tools required by the ipr device driver."
url="https://github.com/bjking1/iprutils"
arch="ppc64le"
license="CPL"
depends="zlib ncurses"
makedepends="autoconf automake libtool linux-headers m4 ncurses-dev zlib-dev"
subpackages="$pkgname-doc"
_pkgver=${pkgver//./-}
source="$pkgname-$pkgver.tar.gz::https://github.com/bjking1/$pkgname/archive/rel-$_pkgver.tar.gz"

builddir="$srcdir"/iprutils-rel-$_pkgver

prepare() {
	default_prepare
        cd "$builddir"
        ./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="afcdefad5e56ab1bd484b74a6bf2b9cdfecc68a9ae7f5920a46c47d7a2e673c7bae339ca1eb0ac29c030247a7cf886c97fdc531626a3e09dad9355f130c934f1  iprutils-2.4.15.tar.gz"
