# Contributor: Jann - Ove Risvik <jann.ove@usaklig.com>
# Maintainer:
pkgname=infiniband-diags
pkgver=1.6.6
pkgrel=1
pkgdesc="Various infiniband diagnostic tools"
url="https://www.openfabrics.org/index.php/openfabrics-software.html"
arch="x86 x86_64 ppc64le"
license="GPL-2.0 BSD"
depends=""
depends_dev="opensm-dev libibmad-dev glib-dev eudev-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.openfabrics.org/downloads/management/$pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

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

md5sums="b855ca3b98afefc2ad6a2de378ab71dd  infiniband-diags-1.6.6.tar.gz"
sha256sums="cc814bcb9aeb7764116602700e8c442dcba883fd43b7e2be990ad78687813780  infiniband-diags-1.6.6.tar.gz"
sha512sums="aeb7a24e16c03bdca1ab8fbd6b1fcc434dae8b96544501aa8643bf8a3a2f3f0cb529b48211f9fe2fb4c61343bfae1ffdec95cb5830da9dd396d9fe0b288b2def  infiniband-diags-1.6.6.tar.gz"
