# Contributor: Stuart Cardall # Maintainer: Stuart Cardall pkgname=libmbim pkgver=1.20.0 pkgrel=0 pkgdesc="MBIM modem protocol helper library" url="https://www.freedesktop.org/wiki/Software/libmbim/" arch="all" license="GPL-2.0-or-later AND LGPL-2.1-or-later" makedepends="$depends_dev gtk-doc python3 glib-dev py3-gobject3 libgudev-dev" subpackages=" $pkgname-dev $pkgname-doc $pkgname-tools $pkgname-bash-completion:bashcomp:noarch " source="https://www.freedesktop.org/software/libmbim/libmbim-$pkgver.tar.xz" build() { ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-static make } check() { make check } package() { make DESTDIR="$pkgdir" install } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname-tools=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions mv "$pkgdir"/usr/share/bash-completion/completions/* \ "$subpkgdir"/usr/share/bash-completion/completions/mbimcli rmdir -p "$pkgdir"/usr/share/bash-completion/completions 2>/dev/null || true } tools() { pkgdesc="Tools for libmbim" mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/libexec mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin mv "$pkgdir"/usr/libexec/* "$subpkgdir"/usr/libexec rmdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/libexec 2>/dev/null || true } sha512sums="9620743a947d3658cc10162d14f47a1c7f0210f2592c80a22ed17904b419a2a82a1dd76e251e2675025071493b30ac69f2e075b991a0d348ee70f45ec404fef1 libmbim-1.20.0.tar.xz"