# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
# Contributor: Zachary Lee Andrews <zcrayfish@gmail.com>
pkgname=lxqt-notificationd
pkgver=2.1.0
pkgrel=1
pkgdesc="LXQt notification daemon"
url="https://github.com/lxqt/lxqt-notificationd"
arch="all !armhf" # armhf blocked by liblxqt and kwindowsystem
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev
	qt6-qttools-dev kwindowsystem-dev
	layer-shell-qt-dev perl
	"
options="!check" # No testsuite
subpackages="$pkgname-lang"
source="https://github.com/lxqt/lxqt-notificationd/releases/download/$pkgver/lxqt-notificationd-$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="
4bb72c8303161c036febfe88ee2a1b32f24f61d2fe17d86d1077045e7784cf31cade0138f526f49c408402f4b81143af0106093569654dd4d579cbb1dd036808  lxqt-notificationd-2.1.0.tar.xz
"
