# 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-other
pkgname=atlantik
# 3.5.10 is 15 years old but the latest commit is actually modern and even updated to Qt6
pkgver=3.5.10_git20240323
pkgrel=0
_commit="6e505f9cd605b1055da3f0ed5d7996968b7d8280"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/atlantik/"
pkgdesc="KDE client for playing Monopoly-like games on the monopd network"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdoctools-dev
	ki18n-dev
	kiconthemes-dev
	knotifications-dev
	knotifyconfig-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libkdegames-dev
	qt6-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/games/atlantik.git"
source="$pkgname-$_commit.tar.gz::https://invent.kde.org/games/atlantik/-/archive/$_commit/atlantik-$_commit.tar.gz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

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="
04b3ced08973b6af14b2427cf9abd2edf2a4b56d01aa1b0c959d1afaba4814ad2db9a56a72476076e9b9931af29b96ed3e68117164a22a5dabf25166ce3fc55f  atlantik-6e505f9cd605b1055da3f0ed5d7996968b7d8280.tar.gz
"
