summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f32280a133435dbc30fd8d2919fc9e12945ed46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: ksj <podhorsky.ksj@gmail.com>
# Contributor: kasa <biuta.jr@gmail.com>
# Contributor: L42y <423300@gmail.com>
# Maintainer: Solomon Choina <shlomochoina@gmail.com>

pkgbase=network-manager-applet-git
pkgname=(network-manager-applet-git nm-connection-editor-git)
pkgver=1.37.0.dev.r7.g077ff541
pkgrel=1
pkgdesc="Applet for managing network connections"
arch=('i686' 'x86_64')
license=('GPL-2.0-or-later')
url="http://www.gnome.org/projects/NetworkManager/"
makedepends=(meson libsecret libnotify gtk3 libnm libnma libnma-gtk4 gtk-doc libmm-glib
            gobject-introspection git libayatana-appindicator gcr iso-codes mobile-broadband-provider-info)
options=('emptydirs')
source=(git+https://gitlab.gnome.org/GNOME/network-manager-applet.git)
sha256sums=('SKIP')
sha512sums=('SKIP')

pkgver() {
           cd "$srcdir"/network-manager-applet/
           git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {

    arch-meson network-manager-applet build \
    -Dld_gc=true \
    -Dteam=true \
    -Dwwan=true \
    -Dappindicator=yes \
    -Dselinux=false \
    -Db_lto=false

  ninja -C build
}

check() {
  ninja -C build test
}

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

package_network-manager-applet-git() {
  provides=("network-manager-applet")
  conflicts=(network-manager-applet)
  replaces=(network-manager-applet)
  depends=(nm-connection-editor libnm libmm-glib libnotify libsecret libayatana-appindicator)

  DESTDIR="$pkgdir" ninja -C build install

      ### Split nm-connection-editor
     _pick nm-connection-editor "$pkgdir"/usr/bin/nm-connection-editor
     _pick nm-connection-editor "$pkgdir"/usr/share/applications/nm-connection-editor.desktop
     _pick nm-connection-editor "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-device-wwan.png
     _pick nm-connection-editor "$pkgdir"/usr/share/locale
     _pick nm-connection-editor "$pkgdir"/usr/share/man/man1/nm-connection-editor.1
     _pick nm-connection-editor "$pkgdir"/usr/share/metainfo
     _pick nm-connection-editor "$pkgdir"/usr/share/icons/hicolor/scalable/apps/nm-device-wwan-symbolic.svg
}

package_nm-connection-editor-git() {
  pkgdesc="NetworkManager GUI connection editor and widgets"
  provides=("nm-connection-editor")
  depends=("libnma")
  conflicts=(nm-connection-editor)
  replaces=(nm-connection-editor)
   mv nm-connection-editor/* "$pkgdir"
}