# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=buho
pkgver=4.0.0
pkgrel=0
pkgdesc="Note taking app based on MauiKit"
# armhf blocked by qt5-qtdeclarative
# s390x, ppc64le, riscv64 and loongarch64 blocked by qt5-qtwebview
arch="all !armhf !s390x !ppc64le !riscv64 !loongarch64"
url="https://invent.kde.org/maui/buho"
license="GPL-2.0-or-later"
depends="
	kde-icons
	mauikit-texteditor
	"
makedepends="
	attica-dev
	extra-cmake-modules
	kconfig-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	mauikit-dev
	mauikit-accounts-dev
	mauikit-filebrowsing-dev
	mauikit-texteditor-dev
	qt6-qtbase-dev
	qt6-qtbase-sqlite
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	qt6-qtwebview-dev
	samurai
	syntax-highlighting-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/buho.git"
source="https://download.kde.org/stable/maui/buho/$pkgver/buho-$pkgver.tar.xz
	0001-$pkgname-Fix-build.patch
	"
options="!check" # No tests available

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
003b7d52573d7d5b1512507415d99356b9f80bb362f19bfd1a12ff8e1a96ec653cafed05900c5aa6563ddeda7d9ee5d93080ec9c5c17e52c61b9d8df662f0796  buho-4.0.0.tar.xz
be665a1aa23e98b0af6f8b667bd5890b59404471ef944aa1410a769d3234d8f751f73ae5c0def93dcf57635d062f4f14980736036ad9ae44450f2e0aac137b7a  0001-buho-Fix-build.patch
"
