# Template file for 'libthai'
pkgname=libthai
version=0.1.28
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="libdatrie-devel"
short_desc="Thai language support routines"
maintainer="newbluemoon <blaumolch@mailbox.org>"
license="LGPL-2.1-or-later"
homepage="https://linux.thai.net/projects/libthai"
distfiles="http://linux.thai.net/pub/ThaiLinux/software/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=ffe0a17b4b5aa11b153c15986800eca19f6c93a4025ffa5cf2cab2dcdf1ae911

# the ‘trietool’ binary is used to create the dictionary
if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" libdatrie"
fi

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