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)
17 _commit=638c2275df9700efe8fa33be1697fa99a906d929 # tags/1.20.2^0
18 source=("git+https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git#commit=$_commit")
23 git describe --tags | sed 's/-rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
29 # https://bugs.archlinux.org/task/74329
30 chmod -x plugins/fibocom/77-mm-fibocom-port-types.rules \
31 plugins/foxconn/mm-foxconn-t77w968-carrier-mapping.conf
36 -D dbus_policy_dir=/usr/share/dbus-1/system.d
37 -D dist_version="\"$pkgver-$pkgrel\""
39 -D plugin_qcom_soc=disabled
44 arch-meson ModemManager build "${meson_options[@]}"
45 meson compile -C build
49 local p="$1" f d; shift
51 d="$srcdir/$p/${f#$pkgdir/}"
52 mkdir -p "$(dirname "$d")"
54 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
58 package_modemmanager() {
59 depends+=(libmm-glib.so libg{lib,object,io,module}-2.0.so libsystemd.so libgudev-1.0.so
60 libqmi-glib.so libmbim-glib.so)
61 optdepends=('usb_modeswitch: install if your modem shows up as a storage drive')
63 meson install -C build --destdir "$pkgdir"
66 _pick libmm usr/include
67 _pick libmm usr/lib/girepository-1.0
68 _pick libmm usr/lib/libmm-glib.so*
69 _pick libmm usr/lib/pkgconfig
70 _pick libmm usr/share/gir-1.0
71 _pick libmm usr/share/gtk-doc/html/libmm-glib
72 _pick libmm usr/share/vala
75 package_libmm-glib() {
76 pkgdesc="ModemManager library"
77 depends=(libg{lib,object,io}-2.0.so)
78 provides=(libmm-glib.so)
83 # vim:set sw=2 sts=-1 et: