# Template file for 'jsonrpc-glib'
pkgname=jsonrpc-glib
version=3.44.0
revision=1
build_style=meson
build_helper="gir"
configure_args="$(vopt_bool gtk_doc enable_gtk_doc) $(vopt_bool gir with_vapi)
 $(vopt_bool gir with_introspection)"
hostmakedepends="pkg-config glib-devel $(vopt_if vala 'vala')
 $(vopt_if gtk_doc gi-docgen)"
makedepends="libglib-devel json-glib-devel"
short_desc="Library to communicate using the JSON-RPC 2.0 specification"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://gitlab.gnome.org/GNOME/jsonrpc-glib"
changelog="https://gitlab.gnome.org/GNOME/jsonrpc-glib/-/raw/main/NEWS"
distfiles="${GNOME_SITE}/jsonrpc-glib/${version%.*}/jsonrpc-glib-${version}.tar.xz"
checksum=69406a0250d0cc5175408cae7eca80c0c6bfaefc4ae1830b354c0433bcd5ce06

build_options="gir vala gtk_doc"
build_options_default="gir vala gtk_doc"

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