maintainer="Antoni Aloy <aaloytorrens@gmail.com>"
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-about
pkgver=2.2.0
pkgrel=0
pkgdesc="Information provider about LXQt and the system"
url="https://github.com/lxqt/lxqt-about"
arch="all !armhf" # armhf blocked by liblxqt and kwindowsystem
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev
	perl kwindowsystem-dev qt6-qttools-dev
	"
subpackages="$pkgname-lang"
options="!check" # No testsuite
source="https://github.com/lxqt/lxqt-about/releases/download/$pkgver/lxqt-about-$pkgver.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

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

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

sha512sums="
b10b71dc6fc2369bd81115292f2fdb84da57d8238fb5674587d8aa9ee0353f94b4575e61ec79bb363751faae272fc8b140ff26071596d6a944dd47e546ec8fa2  lxqt-about-2.2.0.tar.xz
"
