# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Forked from extra/libdbusmenu-qt. Original contributors:
# Contributor: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=libdbusmenu-lxqt
pkgver=0.1.0
pkgrel=1
pkgdesc='A library that provides a Qt implementation of the DBusMenu spec'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/lxqt/libdbusmenu-lxqt'
# https://github.com/lxqt/libdbusmenu-lxqt/blob/master/COPYING
# All source files contain "any later"
license=('LGPL-2.0-or-later')
depends=(qt6-base)
makedepends=(cmake doxygen git)
checkdepends=(dbus xorg-server-xvfb)
source=("git+https://github.com/lxqt/libdbusmenu-lxqt?signed#tag=$pkgver")
sha256sums=('973c5c119c9baea95f24c66e4775cdc80ea22858daf865df86972aad1871a9b8')
validpgpkeys=(
  "19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # https://github.com/tsujan
)

build() {
  cmake -B build -S libdbusmenu-lxqt \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

check() {
  dbus-launch xvfb-run --auto-display cmake --build build --target check
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
