# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=liburing
pkgver=2.8
pkgrel=1
pkgdesc="Linux-native io_uring I/O access library"
arch=(x86_64)
url="https://git.kernel.dk/cgit/liburing"
license=(
  'GPL-2.0-only WITH Linux-syscall-note OR MIT'
  LGPL-2.0-or-later
  MIT
)
makedepends=(git)
provides=(
  liburing.so
  liburing-ffi.so
)
source=("git+https://git.kernel.dk/liburing.git?signed#tag=$pkgname-$pkgver")
sha512sums=('b7ba41854f608ab4423d457936c741f7184d15382d9a0abdde7301ae4669f20ea78a9d9140565b95064b2448a2bf32aa2b1832c7ad45b9e7c289d23256fdcb62')
validpgpkeys=(C0FC392DCADE26D975FA5E4AF7D358FB2971E0A6)  # Jens Axboe <axboe@kernel.dk>

build() {
  local configure_options=(
    --prefix=/usr
    --mandir=/usr/share/man
  )

  cd $pkgname
  ./configure "${configure_options[@]}"
  make
}

package() {
  make DESTDIR="$pkgdir" install -C $pkgname
  install -vDm 644 $pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
