# 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=kde-applications
pkgname=tokodon
pkgver=24.08.0
pkgrel=0
pkgdesc="A Mastodon client for Plasma and Plasma Mobile"
url="https://invent.kde.org/network/tokodon/"
# armhf blocked by extra-cmake-modules
# riscv64, ppc64le, s390x: blocked by proposals
# loongarch64 blocked by purpose
arch="all !armhf !riscv64 !ppc64le !s390x !loongarch64"
license="GPL-3.0-only AND CC0-1.0"
depends="
	kdeclarative
	kirigami
	kirigami-addons
	purpose
	qqc2-desktop-style
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	mpvqt-dev
	purpose-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qt6-qtwebsockets-dev
	qt6-qtwebview-dev
	qtkeychain-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/network/tokodon.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/tokodon-$pkgver.tar.xz"
# No tests
options="!check"

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

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

sha512sums="
56ceee38a6dafb9f8a64a4a282d9c7848477ba29d4b323f05bfa1ed6c2540f7e6257ac7a6a6ca9dc0f26333fbc3639bc50acb95df614e9645695ce14003afef4  tokodon-24.08.0.tar.xz
"
