# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=liburing
pkgver=2.6
_commit=5dd20d52f442feae7023af5772429910d3aa5307  # refs/tags/liburing-2.5
pkgrel=2
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=('2fc45584575daeb2b66fbb00d70878b1339ebbff74e0f98eb0ab61e52b695c30e88a147edda44952a3163d9cbaec9544f42ef58b69388c53d9f15f0e436391c0')

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/"
}
