# Template file for 'libaccounts-glib'
pkgname=libaccounts-glib
version=1.24
revision=6
build_style=meson
build_helper="gir"
hostmakedepends="gtk-doc pkg-config python3-gobject-devel
 glib-devel gobject-introspection vala"
makedepends="sqlite-devel libxml2-devel libglib-devel python3-gobject-devel check-devel"
short_desc="GLib-based client library for the accounts database"
maintainer="John Rowley <enterthevoid@codesector.co>"
license="LGPL-2.1-only"
homepage="https://gitlab.com/accounts-sso/libaccounts-glib"
distfiles="https://gitlab.com/accounts-sso/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
checksum=eebb1c6debfcf929efb388a0f28d8cc8ec9b32f273e4abe4224a33e5d299cd73

if [ "$CROSS_BUILD" ]; then
	# Remove docs. During install of package, it will try
	# to run target binary with host, which causes exec error
	post_patch() {
		vsed -e '/docs/d' -i meson.build
	}
fi

libaccounts-glib-devel_package() {
	short_desc+=" - development files"
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}
