# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: David Herrmann <dh.herrmann@gmail.com>

pkgname=dbus-broker
pkgver=33
pkgrel=1
pkgdesc="Linux D-Bus Message Broker"
url="https://github.com/bus1/dbus-broker/wiki"
arch=(x86_64)
license=(Apache)
depends=(
  audit
  expat
  systemd-libs
)
makedepends=(
  meson
  python-docutils
  systemd
)
source=(
  https://github.com/bus1/dbus-broker/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz{,.asc}
)
sha256sums=('23713f25624749fdb274907e429080fa2d8f4dbe76acd87bb6d21a3c818c7841'
            'SKIP')
validpgpkeys=(BE5FBC8C9C1C9F60A4F0AEAE7A4F3A09EBDEFF26) # David Herrmann <dh.herrmann@gmail.com>

prepare() {
  cd $pkgname-$pkgver
}

build() {
  local meson_options=(
    -D audit=true
    -D docs=true
    -D linux-4-17=true
    -D system-console-users=gdm,sddm,lightdm,lxdm
  )

  arch-meson $pkgname-$pkgver build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
