# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-about
pkgver=2.1.0
pkgrel=1
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="
a9dd1c9f0f1fa0a13ae0499912891b667e1418c2247d8cd0f14b37034316133bfd0c7e8de6a8d2261c7d13e2358220971c90eee5addef07e86d49312e4dbce6d  lxqt-about-2.1.0.tar.xz
"
