maintainer="Antoni Aloy <aaloytorrens@gmail.com>"
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-qtplugin
pkgver=2.2.0
pkgrel=0
pkgdesc="Qt-LXQt plugin integration"
url="https://github.com/lxqt/lxqt-qtplugin"
arch="all !armhf" # armhf blocked by liblxqt-dev
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev libdbusmenu-lxqt-dev
	libfm-qt-dev qt6-qttools-dev qt6-qtbase-private-dev
	"
options="!check" # No testsuite
source="https://github.com/lxqt/lxqt-qtplugin/releases/download/$pkgver/lxqt-qtplugin-$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
}
sha512sums="
98f50453b9be659cc4b7cd69addb2e24ee6ab8e9c865f873a88971480bccee8fddc1417da1075b4d94faf46c50176ec2b6b45d04aed969808493254921ca6ddb  lxqt-qtplugin-2.2.0.tar.xz
"
