# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=hwloc
pkgver=2.11.2
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-3-Clause')
depends=(
  'glibc'
  'libpciaccess'
  'libtool'
  'ncurses'
  'systemd-libs'
)
makedepends=(
  'cairo'
  'libx11'
  'libxml2'
  'systemd'
)
optdepends=(
  'cairo: PDF, Postscript, and PNG export support'
  'libxml2: full XML import/export support'
)
options=('!docs')
source=("https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('488bfdeb32d2b98cffc43a537e87422d70abcc2bc029e4b5c911fc3e37189a9213dc8efd5552e2fda0d2b03d4ec25ebd45e0680dd129da046798750c5f5eb72f')
b2sums=('e4764883eb3678fba6d6bd30fba27d68bd15cefccfcbc9d628573447f5f507a348e197d5003cc016fd4e27da05dc8c0ebd8644a4530f8499016d255c62602fc2')

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

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

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

# vim: ts=2 sw=2 et:
