# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libnghttp3
pkgver=1.4.0
pkgrel=1
pkgdesc="HTTP/3 library written in C"
url='https://github.com/ngtcp2/nghttp3'
arch=('x86_64')
license=('MIT')
depends=('glibc')
provides=('libnghttp3.so')
source=("https://github.com/ngtcp2/nghttp3/releases/download/v${pkgver}/nghttp3-${pkgver}.tar.xz"{,.asc})
sha256sums=('c87b27ef33982a3b831dd349f4a75c55bd4c22a8ec0890095b84b54009df9d6a'
            'SKIP')

prepare() {
  cd nghttp3-${pkgver}
  autoreconf -i
}

build() {
  cd nghttp3-${pkgver}
  ./configure \
    --prefix=/usr
  make
}

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

package() {
  cd nghttp3-${pkgver}/lib
  make DESTDIR="${pkgdir}" install
  install -Dm644 ../COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
