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

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=isoimagewriter
pkgver=24.08.1
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/ISOImageWriter"
pkgdesc="A program to write hybrid ISO files onto a USB disk"
license="GPL-3.0-only"
makedepends="
	eudev-dev
	extra-cmake-modules
	gpgme-dev
	kauth-dev
	kcoreaddons-dev
	kcrash-dev
	ki18n-dev
	kiconthemes-dev
	kwidgetsaddons-dev
	qt6-qtbase-dev
	samurai
	solid-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/utilities/isoimagewriter.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/isoimagewriter-$pkgver.tar.xz"

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

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

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

sha512sums="
63968de1715780d11628222878f84ea150ee6f32013823e4babd48f34fd8d683ae5a469bac7a54ee66a68c7c8ffd0daf9bd59f349ef6adbb396d4f1cff000ff8  isoimagewriter-24.08.1.tar.xz
"
