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

build_options="gir man"
build_options_default="gir"

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

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