pkgname=spral
pkgver=2025.09.18
pkgrel=1
pkgdesc="Sparse Parallel Robust Algorithms Library"
arch=('aarch64' 'x86_64')
url="https://github.com/ralna/spral"
license=('BSD')
makedepends=(gcc-fortran meson)
depends=('metis' 'lapack' 'hwloc')
source=("https://github.com/ralna/spral/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('1358168ac95297049e4fc810e54a16e0c765796cfbaa156e09979e2620b7dae7')

build() {
  cd $pkgname-$pkgver
  arch-meson build -Dtests=false -Dmodules=false
  meson compile -C build
}

package () {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" meson install -C build
  install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
