# Template file for 'libchewing'
pkgname=libchewing
version=0.12.0
revision=1
_data_version=2026.3.22
build_style=cmake
build_helper=qemu
hostmakedepends="corrosion cargo"
makedepends="sqlite-devel rust-std"
short_desc="Intelligent phonetic (Zhuyin/Bopomofo) input method"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
homepage="http://chewing.im/"
changelog="https://codeberg.org/chewing/libchewing/raw/branch/master/NEWS"
distfiles="https://codeberg.org/chewing/libchewing/archive/v${version}.tar.gz
 https://codeberg.org/chewing/libchewing-data/archive/v${_data_version}.tar.gz
"
checksum="151764f5448f0c9d4206c2d6f947e819d3517b692a3dafb88fc5fecd90ce9ec0
 6bc29a7cb79eb1c68f3a42209c26b5b86aa6bbad71e71bc3091d27a7f4ddc6a3
"

skip_extraction="v${_data_version}.tar.gz"

post_extract() {
	vsrcextract -C data v${_data_version}.tar.gz
}

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