# Template file for 'libfyaml'
pkgname=libfyaml
version=0.9.6
revision=1
build_style=gnu-configure
configure_args="--disable-network --libdir=/usr/lib"
hostmakedepends="pkg-config autoconf automake libtool git jq
 python3-pip"
makedepends="libyaml-devel check-devel"
short_desc="Fully feature complete YAML parser and emitter"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/pantoniou/libfyaml"
changelog="https://raw.githubusercontent.com/pantoniou/libfyaml/refs/heads/master/CHANGELOG.md"
distfiles="https://github.com/pantoniou/libfyaml/archive/refs/tags/v${version}.tar.gz"
checksum=2d016379a69f6cf6beaf06d12bcefe1ad1784bab28fbb41a6fa8d49d25f1bc0a

pre_configure() {
	case "$XBPS_TARGET_MACHINE" in
		armv6l*) export CFLAGS+=" -march=armv6k" ;;
	esac

	./bootstrap.sh
}

post_install() {
	vlicense LICENSE
}

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