archrelease: copy trunk to extra-x86_64
[arch-packages.git] / modemmanager / trunk / PKGBUILD
blob1cb82f6aa5ecb0472d803d78a9dc9a50406104d3
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgbase=modemmanager
5 pkgname=(modemmanager libmm-glib)
6 pkgver=1.20.6
7 pkgrel=1
8 pkgdesc="Mobile broadband modem management service"
9 url="https://www.freedesktop.org/wiki/Software/ModemManager/"
10 arch=(x86_64)
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")
18 sha256sums=('SKIP')
20 pkgver() {
21   cd ModemManager
22   git describe --tags | sed 's/-rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
25 prepare() {
26   cd ModemManager
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
33 build() {
34   local meson_options=(
35     -D dbus_policy_dir=/usr/share/dbus-1/system.d
36     -D dist_version="\"$pkgver-$pkgrel\""
37     -D gtk_doc=true
38     -D plugin_qcom_soc=disabled
39     -D polkit=permissive
40     -D vapi=true
41   )
43   arch-meson ModemManager build "${meson_options[@]}"
44   meson compile -C build
47 _pick() {
48   local p="$1" f d; shift
49   for f; do
50     d="$srcdir/$p/${f#$pkgdir/}"
51     mkdir -p "$(dirname "$d")"
52     mv "$f" "$d"
53     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
54   done
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"
64   cd "$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)
79   mv libmm/* "$pkgdir"
82 # vim:set sw=2 sts=-1 et: