# Template file for 'ark'
pkgname=ark
version=20.08.1
revision=1
build_style=cmake
hostmakedepends="extra-cmake-modules qt5-devel qt5-qmake
 kdoctools kconfig gettext pkg-config"
makedepends="libarchive-devel kpty-devel kparts-devel kitemmodels-devel libzip-devel"
short_desc="KDE Archiving Tool"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later"
homepage="https://kde.org/applications/en/utilities/org.kde.ark"
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
checksum=32e8546b186b88efc9d4688e02def0b6225d921f9b92cfcd328417f09ec0f725

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" python3 kcoreaddons kparts"
	configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
fi

pre_configure() {
	# Commands below are taken and modified from "prepare" function of:
	# https://git.parabola.nu/abslibre.git/tree/libre/ark/PKGBUILD
	rm -rv plugins/clirarplugin
	rm -rv autotests/plugins/clirarplugin
}

pre_check() {
	export QT_QPA_PLATFORM=offscreen
}
