# Template file for 'libu2f-server'
pkgname=libu2f-server
version=1.1.0
revision=9
wrksrc="${pkgname}-${pkgname}-${version}"
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config gengetopt check"
makedepends="json-c-devel hidapi-devel openssl-devel check-devel"
short_desc="Yubico Universal 2nd Factor (U2F) Server C Library"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD"
homepage="https://developers.yubico.com/libu2f-server/"
distfiles="https://github.com/Yubico/libu2f-server/archive/libu2f-server-${version}.tar.gz"
checksum=6551109e692c9c4fea61e99f1cd8377e8e54e3033e421cc191da6d673311c860

pre_configure() {
	autoreconf -fi
}

post_install() {
	vlicense COPYING LICENSE
}

libu2f-server-devel_package() {
	short_desc+=" - development files"
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.a
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}
