# Contributor: Aron Barath <aron-alpine@mailbox.org>
# Maintainer: Aron Barath <aron-alpine@mailbox.org>
pkgname=x2goclient
pkgver=4.1.2.3
pkgrel=0
pkgdesc="A graphical client (Qt5) for the X2Go system"
url="https://wiki.x2go.org/doku.php"
arch="all !riscv64" # nx-libs
license="GPL-2.0"
options="!check" # no test suite provided
subpackages="$pkgname-doc $pkgname-dbg"
depends="hicolor-icon-theme nx-libs"
makedepends="qt5-qttools-dev qt5-qtx11extras-dev qt5-qtsvg-dev xdg-utils
	xauth libxpm-dev hicolor-icon-theme libssh-dev nx-libs-dev cups-dev
	openldap-dev libldap bash"
source="
	https://code.x2go.org/releases/source/x2goclient/x2goclient-$pkgver.tar.gz
	fix-ssh-thread-stack-size.patch
	makefile.patch
	"

prepare() {
	default_prepare

	sed -i "s:-o root -g root ::" Makefile
	sed -i -e 's/qt4/qt5/' Makefile
}

build() {
	make PREFIX=/usr
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
1bd59efaaf560bf36dad979cbb67cf90df13943688e1259e86d441ba17677d523ad1f69061d2f65b0ca8eee9e7d00ee242e95c555b4446d72f37acef70a9b435  x2goclient-4.1.2.3.tar.gz
d76246860968ff02020c505be96caf0185711d754d5dc0f1bffea1d6d5b8aaa4735f9d1f566e0df16c059536d2bc33ff047694f61357e950bd7e2f1724a9e035  fix-ssh-thread-stack-size.patch
88cc2d86ed01df373fac67b6ee58fdbdb11f0f5cb3d7ee86f4ddbefbef00099593083467344c2ad9ab7ee4ee1193449edde80f6e8b1799efef51d4d5006b46e2  makefile.patch
"
