# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libqmi
pkgver=1.34.0
pkgrel=1
pkgdesc="QMI modem protocol helper library"
url="https://www.freedesktop.org/wiki/Software/libqmi/"
arch=(x86_64)
license=(GPL2)
depends=(
  libgudev
  libmbim
  libqrtr-glib
)
makedepends=(
  bash-completion
  git
  gobject-introspection
  gtk-doc
  help2man
  meson
)
provides=(libqmi-glib.so)
_commit=3f07d6e5b4677558543b3b4484ea88ad92257e92  # tags/1.34.0^0
source=("git+https://gitlab.freedesktop.org/mobile-broadband/libqmi.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd libqmi
  git describe --tags | sed 's/-rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libqmi
}

build() {
  local meson_options=(
    -D gtk_doc=true
  )

  arch-meson libqmi build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs --no-rebuild
}

package() {
  meson install -C build --destdir "$pkgdir" --no-rebuild
}

# vim:set sw=2 sts=-1 et:
