# 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-frameworks-old
pkgname=frameworkintegration5
pkgver=5.116.0
pkgrel=0
pkgdesc="Framework providing components to allow applications to integrate with a KDE Workspace"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://www.kde.org"
license="LGPL-2.1-or-later"
depends_dev="
	appstream-dev
	kconfig5-dev
	kconfigwidgets5-dev
	ki18n5-dev
	kiconthemes5-dev
	knewstuff5-dev
	knotifications5-dev
	kpackage5-dev
	kwidgetsaddons5-dev
	qt5-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/frameworks/frameworkintegration.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/frameworkintegration-$pkgver.tar.xz"
subpackages="$pkgname-dev"
builddir="$srcdir/frameworkintegration-$pkgver"

replaces="frameworkintegration<=5.110.0-r0"

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

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

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

sha512sums="
425fd38f87b2bba96f68afb8bc8108f9da6011106e33f32b2d91b97b8330d54d0bdc26bec8ecf50c32471d8f8e85af5f6d8b3feee0815225f5dd2075c41c8a83  frameworkintegration-5.116.0.tar.xz
"
