1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
5 pkgname=(modemmanager libmm-glib)
8 pkgdesc="Mobile broadband modem management service"
9 url="https://www.freedesktop.org/wiki/Software/ModemManager/"
11 license=(GPL2 LGPL2.1)
12 depends=(systemd libgudev polkit ppp libqmi libmbim
13 mobile-broadband-provider-info)
14 makedepends=(gtk-doc gobject-introspection vala meson git bash-completion)
15 checkdepends=(python-gobject python-dbus)
16 _commit=6aa0ff583d04aea88b4da7a1c20049f57062dab6 # tags/1.20.6^0
17 source=("git+https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git#commit=$_commit")
22 git describe --tags | sed 's/-rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
28 # https://bugs.archlinux.org/task/74329
29 chmod -x plugins/fibocom/77-mm-fibocom-port-types.rules \
30 plugins/foxconn/mm-foxconn-t77w968-carrier-mapping.conf
35 -D dbus_policy_dir=/usr/share/dbus-1/system.d
36 -D dist_version="\"$pkgver-$pkgrel\""
38 -D plugin_qcom_soc=disabled
43 arch-meson ModemManager build "${meson_options[@]}"
44 meson compile -C build
48 local p="$1" f d; shift
50 d="$srcdir/$p/${f#$pkgdir/}"
51 mkdir -p "$(dirname "$d")"
53 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
57 package_modemmanager() {
58 depends+=(libmm-glib.so libg{lib,object,io,module}-2.0.so libsystemd.so libgudev-1.0.so
59 libqmi-glib.so libmbim-glib.so)
60 optdepends=('usb_modeswitch: install if your modem shows up as a storage drive')
62 meson install -C build --destdir "$pkgdir"
65 _pick libmm usr/include
66 _pick libmm usr/lib/girepository-1.0
67 _pick libmm usr/lib/libmm-glib.so*
68 _pick libmm usr/lib/pkgconfig
69 _pick libmm usr/share/gir-1.0
70 _pick libmm usr/share/gtk-doc/html/libmm-glib
71 _pick libmm usr/share/vala
74 package_libmm-glib() {
75 pkgdesc="ModemManager library"
76 depends=(libg{lib,object,io}-2.0.so)
77 provides=(libmm-glib.so)
82 # vim:set sw=2 sts=-1 et: