# Template file for 'cutechess-gui'
pkgname=cutechess-gui
version=1.5.1
revision=1
build_style=cmake
hostmakedepends="qt6-tools qt6-base"
makedepends="qt6-svg-devel qt6-qt5compat-devel"
depends="hicolor-icon-theme"
short_desc="GUI for playing chess"
maintainer="Imran Khan <imran@khan.ovh>"
license="GPL-3.0-or-later AND MIT"
homepage="https://cutechess.com/"
changelog="https://raw.githubusercontent.com/cutechess/cutechess/master/CHANGELOG.md"
distfiles="https://github.com/cutechess/cutechess/archive/refs/tags/v${version}.tar.gz"
checksum=063f94f8a421952487cc49acddd218962c3881bfdf0219ad8f159954678fb375

do_install() {
	vbin build/cutechess
	vinstall dist/linux/cutechess.desktop 644 usr/share/applications
	sed -n '2,23s:^[ ]*::p' projects/gui/components/pgnhighlighter/src/pgnhighlighter.h > COPYING.gui
	vlicense COPYING.gui
}

cutechess-cli_package() {
	short_desc="CLI tool to automate chess engine tournaments"
	pkg_install() {
		vbin build/cutechess-cli
		vman docs/cutechess-cli.6
	}
}
