# Template file for 'libpsl'
pkgname=libpsl
version=0.21.5
revision=1
build_style=gnu-configure
configure_args="--enable-runtime=libidn2
 --with-psl-distfile=/usr/share/publicsuffix/public_suffix_list.dafsa
 --with-psl-file=/usr/share/publicsuffix/public_suffix_list.dat"
hostmakedepends="pkg-config python3 public-suffix"
makedepends="libidn2-devel libunistring-devel"
depends="public-suffix"
short_desc="Public Suffix List library functions"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT, BSD-3-Clause"
homepage="https://rockdaboot.github.io/libpsl/"
changelog="https://raw.githubusercontent.com/rockdaboot/libpsl/master/NEWS"
distfiles="https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.gz"
checksum=1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208
python_version=3

post_install() {
	vbin src/psl-make-dafsa
	vlicense COPYING
	vlicense src/LICENSE.chromium
}

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