# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-admin
pkgver=2.1.0
pkgrel=1
pkgdesc="LXQt system administration tool"
url="https://github.com/lxqt/lxqt-admin"
# armhf: blocked by liblxqt and kwindowsystem
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
	"
options="!check" # No testsuite
subpackages="$pkgname-lang"
source="https://github.com/lxqt/lxqt-admin/releases/download/$pkgver/lxqt-admin-$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-time
	amove usr/share/lxqt/translations/$pkgname-user
}

sha512sums="
880b12f3545a8bddd6f2e0eeb666a3d04be9021b63d66ded3ca5941a959c189147bee02f23cfd149f5396022a63b4949638f558b3279c8bfcfc40d5455da915a  lxqt-admin-2.1.0.tar.xz
"
