# Template file for 'libmbim'
pkgname=libmbim
version=1.32.0
revision=1
build_style=meson
build_helper="gir"
configure_args="-Dintrospection=true $(vopt_bool man)"
hostmakedepends="pkg-config $(vopt_if man help2man)"
makedepends="glib-devel libgudev-devel bash-completion"
short_desc="MBIM modem protocol helper library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.freedesktop.org/wiki/Software/libmbim/"
distfiles="https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/archive/${version}/libmbim-${version}.tar.bz2"
checksum=47228f0c07dfb2fbf51e35eb60f12c22113ef6923a0e23fcae3b2a4efee5ed29

build_options="gir man"
build_options_default="gir"

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" glib-devel"
else
	build_options_default+=" man"
fi

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