# Template file for 'libvirt-glib'
pkgname=libvirt-glib
version=4.0.0
revision=1
build_helper="gir"
build_style=meson
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
 -Dvapi=$(vopt_if vala enabled disabled) -Ddocs=$(vopt_if doc enabled disabled)"
hostmakedepends="automake pkg-config intltool glib-devel gettext-devel
 python-devel $(vopt_if vala vala) $(vopt_if doc gtk-doc)"
makedepends="libglib-devel libvirt-devel libxml2-devel python-devel"
short_desc="Glib integration with libvirt"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://libvirt.org"
distfiles="http://libvirt.org/sources/glib/${pkgname}-${version}.tar.xz"
checksum=8423f7069daa476307321d1c11e2ecc285340cd32ca9fc05207762843edeacbd
replaces="libvirt-glib-python>=0"

build_options="doc gir vala"
build_options_default="gir vala"

libvirt-glib-devel_package() {
	depends="libglib-devel libxml2-devel libvirt-devel ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		if [ "$build_option_doc" ]; then
			vmove usr/share/gtk-doc
		fi
		if [ "$build_option_gir" ]; then
			vmove usr/share/gir-1.0
			vmove usr/share/vala
		fi
	}
}
