# Template file for 'grilo'
pkgname=grilo
version=0.3.19
revision=1
build_style=meson
build_helper="gir"
configure_args="$(vopt_bool gir enable-introspection) $(vopt_bool gir enable-vala)
 $(vopt_bool gtk_doc enable-gtk-doc)"
hostmakedepends="gettext pkg-config glib-devel $(vopt_if gir vala)
 $(vopt_if gtk_doc gtk-doc)"
makedepends="gtk+3-devel libxml2-devel libsoup3-devel liboauth-devel
 totem-pl-parser-devel"
short_desc="Framework focused on making media discovery and browsing easy"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://wiki.gnome.org/Projects/Grilo"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=0869c81d19ab139c667d79567c14ddcb6cb5cbfc0108d04cade287eb29536706

# Package build options
build_options="gir gtk_doc"
build_options_default="gir"

if [ -z "$CROSS_BUILD" ]; then
	build_options_default+=" gtk_doc"
fi

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