# Description: A system tray applet for NetworkManager
# URL: https://wiki.gnome.org/Projects/NetworkManager/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: consolekit libgudev libnma libnotify libsecret
# Optional: libappindicator-gtk3

name=network-manager-applet
version=1.32.0
release=1
source=(https://gitlab.gnome.org/GNOME/network-manager-applet/-/archive/$version/network-manager-applet-$version.tar.bz2)

build() {
  prt-get isinst libappindicator-gtk3 && PKGMK_NMA+=' -D appindicator=yes' || PKGMK_NMA+=' -D appindicator=no'

  meson setup $name-$version build $PKGMK_NMA \
    --prefix=/usr \
    --sysconfdir=/etc \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true \
    -D selinux=false \
    -D team=false \
    -D wwan=false
  meson compile -C build
  DESTDIR=$PKG meson install -C build

  rm -r $PKG/usr/share/locale

  # provided by libnma
  rm -r $PKG/usr/share/glib-2.0/schemas
}
