# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=nghttp2
pkgver=1.29.0
pkgrel=0
pkgdesc="Experimental HTTP/2 client, server and proxy"
url="https://nghttp2.org/"
arch="all"
license="MIT"
makedepends="libev-dev libressl-dev zlib-dev c-ares-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://github.com/tatsuhiro-t/$pkgname/releases/download/v$pkgver/nghttp2-$pkgver.tar.xz"
builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	make check
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--without-libxml2 \
		--without-spdylay \
		--without-neverbleed \
		--without-jemalloc \
		--disable-python-bindings \
		--enable-app
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="a518ff1dcc9ae93f8228f4fa9110b9cbc460260a794d455530218c66317c6b96a5b14971aff25428e37326b5ce9f4d8480eefe6fcba17af23efa4ebceb56f23e  nghttp2-1.29.0.tar.xz"
