# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sylvain HENRY <hsyl20@yahoo.fr>
# Contributor: Hervé YVIQUEL <elldekaa@gmail.com>

pkgname=hwloc
pkgver=2.8.0
pkgrel=1
pkgdesc='Portable Hardware Locality is a portable abstraction of hierarchical architectures'
url='https://www.open-mpi.org/projects/hwloc/'
arch=('x86_64')
license=('BSD')
depends=('glibc' 'libtool' 'systemd-libs' 'libpciaccess')
makedepends=('cairo' 'libxml2' 'pciutils' 'systemd' 'libx11')
optdepends=('cairo' 'libxml2' 'pciutils' 'libx11')
options=('!docs')
source=(https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/${pkgname}-${pkgver}.tar.bz2)
sha512sums=('025c8ebc2945bdf696cc66fe2cfea0195694713a6098603fb4eaeac409d2f6c3386a7c2b4d7f3758d828f6b621e7f06ffb5745224cb1df2f8ff4f19b2a8a4a7b')
b2sums=('33f75987ee904d5ee9c62268695a2f7f59b0adc2e1601fc4407f525664b78a7fab04c75823ce9d190c8cb9ffc0ce983d7137555625d47bc1451a2d0c6f330055')

build() {
  cd hwloc-${pkgver}
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --enable-plugins \
    --sysconfdir=/etc
  make
}

check() {
  cd hwloc-${pkgver}
  make check
}

package() {
  cd hwloc-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
