# Template file for 'lilv'
pkgname=lilv
version=0.28.0
revision=1
build_style=meson
hostmakedepends="pkg-config python3-packaging-bootstrap"
makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
 zix-devel lv2"
short_desc="Simple yet powerful C API for using LV2 plugins"
maintainer="Orphaned <orphan@voidlinux.org>"
license="ISC"
homepage="https://gitlab.com/lv2/lilv"
changelog="https://gitlab.com/lv2/lilv/-/raw/main/NEWS"
distfiles="https://gitlab.com/lv2/lilv/-/archive/v${version}/lilv-v${version}.tar.gz"
checksum=006065dcb59ccaad5463e6bb4598160e41dd6474a959838e74820f60a849bfdb

post_install() {
	vlicense COPYING
	rm -r ${DESTDIR}/etc/bash_completion.d
}

liblilv_package() {
	short_desc+=" - Runtime library"
	pkg_install() {
		vmove "usr/lib/*.so.*"
		chmod 755 ${PKGDESTDIR}/usr/lib/*.so*
	}
}

lilv-bash-completion_package() {
	depends="bash-completion lilv"
	short_desc+=" - Bash completion for Lilv"
	pkg_install() {
		vcompletion tools/lilv.bash_completion bash
	}
}

lilv-devel_package() {
	depends="serd-devel sord-devel sratom-devel lv2 liblilv>=${version}_${revision}"
	short_desc+=" - Development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
