HOMEPAGE="https://nghttp2.org/"
SRC_URI="https://github.com/tatsuhiro-t/${PN}/releases/download/v${PV}/${P}.tar.xz"

CATEGORY="Net"
SUMMARY="HTTP/2.0 C Library"
DESCRIPTION="This is an experimental implementation of Hypertext Transfer Protocol version
2.0."

CYGCONF_ARGS="
	--enable-app
	--enable-hpack-tools
	--enable-asio-lib
	--enable-examples
	--disable-python-bindings
"

src_install()
{
	cd ${B}
	cyginstall

	cd ${S}
	insinto /usr/share/${PN}
	doins *.sample
}

DIFF_EXCLUDES="
	setenv
"

PKG_NAMES="
	${PN}
	lib${PN}_16
	lib${PN}-devel
"
nghttp2_CONTENTS="
	usr/bin/*.exe
	usr/share
"
libnghttp2_16_CONTENTS="
	usr/bin/*.dll
"
libnghttp2_devel_CONTENTS="
	usr/include
	usr/lib/lib${PN}.dll.a
	usr/lib/pkgconfig
"
nghttp2_SUMMARY="${SUMMARY} (utilities)"
libnghttp2_16_SUMMARY="${SUMMARY} (runtime)"
libnghttp2_devel_SUMMARY="${SUMMARY} (development)"
