1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
4 pkgname=(libnma-common libnma libnma-gtk4)
7 pkgdesc="NetworkManager GUI client library"
8 url="https://gitlab.gnome.org/GNOME/libnma"
11 makedepends=(gobject-introspection git gtk-doc meson vala libnm gcr gtk3 gtk4
12 iso-codes mobile-broadband-provider-info dconf)
14 _commit=8f21d3b1f6825d2dad37f203649ac79e0e6ff171 # tags/1.8.40^0
15 source=("git+https://gitlab.gnome.org/GNOME/libnma.git#commit=$_commit")
20 git describe --tags | sed 's/-dev/dev/;s/[^-]*-g/r&/;s/-/+/g'
28 arch-meson libnma build -D libnma_gtk4=true
29 meson compile -C build
33 meson test -C build --print-errorlogs
37 local p="$1" f d; shift
39 d="$srcdir/$p/${f#$pkgdir/}"
40 mkdir -p "$(dirname "$d")"
42 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
46 package_libnma-common() {
47 pkgdesc+=" (common files)"
48 depends=(libnm iso-codes mobile-broadband-provider-info dconf)
50 meson install -C build --destdir "$pkgdir"
54 _pick gtk3 usr/lib/libnma.so*
55 _pick gtk3 usr/lib/pkgconfig/libnma.pc
56 _pick gtk3 usr/lib/girepository-1.0/NMA-*
57 _pick gtk3 usr/share/gir-1.0/NMA-*
58 _pick gtk3 usr/share/vala/vapi/libnma.*
60 _pick gtk4 usr/lib/libnma-gtk4.so*
61 _pick gtk4 usr/lib/pkgconfig/libnma-gtk4.pc
62 _pick gtk4 usr/lib/girepository-1.0/NMA4-*
63 _pick gtk4 usr/share/gir-1.0/NMA4-*
64 _pick gtk4 usr/share/vala/vapi/libnma-gtk4.*
69 depends=(libnma-common="$pkgver-$pkgrel" gtk3 gcr)
75 package_libnma-gtk4() {
77 depends=(libnma-common="$pkgver-$pkgrel" gtk4)
78 provides=(libnma-gtk4.so)