# Template file for 'libportal'
pkgname=libportal
version=0.3
revision=2
build_style=meson
configure_args="$(vopt_bool gtk_doc gtk_doc)"
hostmakedepends="pkg-config gtk-doc glib-devel"
makedepends="glib-devel"
short_desc="Flatpak portal library"
maintainer="q66 <daniel@octaforge.org>"
license="LGPL-2.0-or-later"
homepage="https://github.com/flatpak/libportal"
distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=fd35d66357169e63e33ef46c43fdf22ddc07dbd960ec3462b58ca9ef15a65bd7

build_options="gtk_doc"

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

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