db-move: moved linux-zen from [testing] to [extra] (x86_64)
[arch-packages.git] / libnma / repos / extra-x86_64 / PKGBUILD
blobadd14abdac7a2b4909cc84387de880a1ac69ff5a
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgbase=libnma
4 pkgname=(libnma-common libnma libnma-gtk4)
5 pkgver=1.10.6
6 pkgrel=2
7 pkgdesc="NetworkManager GUI client library"
8 url="https://gitlab.gnome.org/GNOME/libnma"
9 arch=(x86_64)
10 license=(GPL LGPL)
11 makedepends=(
12   dconf
13   gcr-4
14   git
15   gobject-introspection
16   gtk-doc
17   gtk3
18   gtk4
19   iso-codes
20   libnm
21   meson
22   mobile-broadband-provider-info
23   vala
25 _commit=3e324b69d0d74c8693fb58b9ee66efe0bad6cb34  # tags/1.10.6^0
26 source=(
27   "git+https://gitlab.gnome.org/GNOME/libnma.git#commit=$_commit"
29 b2sums=('SKIP')
31 pkgver() {
32   cd libnma
33   git describe --tags | sed 's/-dev/dev/;s/[^-]*-g/r&/;s/-/+/g'
36 prepare() {
37   cd libnma
40 build() {
41   local meson_options=(
42     -D libnma_gtk4=true
43   )
45   arch-meson libnma build "${meson_options[@]}"
46   meson compile -C build
49 check() {
50   meson test -C build --print-errorlogs
53 _pick() {
54   local p="$1" f d; shift
55   for f; do
56     d="$srcdir/$p/${f#$pkgdir/}"
57     mkdir -p "$(dirname "$d")"
58     mv "$f" "$d"
59     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
60   done
63 package_libnma-common() {
64   pkgdesc+=" (common files)"
65   depends=(
66     dconf
67     gcr-4
68     iso-codes
69     libnm
70     mobile-broadband-provider-info
71   )
73   meson install -C build --destdir "$pkgdir"
75   cd "$pkgdir"
77   _pick gtk3 usr/lib/libnma.so*
78   _pick gtk3 usr/lib/pkgconfig/libnma.pc
79   _pick gtk3 usr/lib/girepository-1.0/NMA-*
80   _pick gtk3 usr/share/gir-1.0/NMA-*
81   _pick gtk3 usr/share/vala/vapi/libnma.*
83   _pick gtk4 usr/lib/libnma-gtk4.so*
84   _pick gtk4 usr/lib/pkgconfig/libnma-gtk4.pc
85   _pick gtk4 usr/lib/girepository-1.0/NMA4-*
86   _pick gtk4 usr/share/gir-1.0/NMA4-*
87   _pick gtk4 usr/share/vala/vapi/libnma-gtk4.*
89   # Moved to network-manager-applet 1.30.0
90   # https://bugs.archlinux.org/task/76489
91   rm usr/share/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml
94 package_libnma() {
95   pkgdesc+=" (GTK3)"
96   depends=(libnma-common="$pkgver-$pkgrel" gtk3)
97   provides=(libnma.so)
99   mv gtk3/* "$pkgdir"
102 package_libnma-gtk4() {
103   pkgdesc+=" (GTK4)"
104   depends=(libnma-common="$pkgver-$pkgrel" gtk4)
105   provides=(libnma-gtk4.so)
107   mv gtk4/* "$pkgdir"
110 # vim:set sw=2 sts=-1 et: