# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-policykit
pkgver=2.1.0
pkgrel=1
pkgdesc="LXQt PolicyKit agent"
url="https://github.com/lxqt/lxqt-policykit"
# armhf blocked by liblxqt-dev
arch="all !armhf"
license="LGPL-2.0-or-later"
makedepends="
	cmake
	kwindowsystem-dev
	liblxqt-dev
	lxqt-build-tools
	polkit-qt-dev
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://github.com/lxqt/lxqt-policykit/releases/download/$pkgver/lxqt-policykit-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True
	cmake --build build
}

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

lang() {
	install_if="lang $pkgname=$pkgver-r$pkgrel"
	amove usr/share/lxqt/translations/$pkgname-agent
}

sha512sums="
5b72ae8f9fa063c8b5794f4db74086deefb1d12544765fe8c9a22782465ad1f0794caa39221730d18ca104cdce4498c5d66d07a229a90da3a3b28172d1152236  lxqt-policykit-2.1.0.tar.xz
"
