# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=remmina
pkgver=1.4.35
pkgrel=0
pkgdesc="Remmina is a remote desktop client written in GTK+"
url="https://www.remmina.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	avahi-ui-dev
	cmake
	curl-dev
	freerdp
	freerdp-dev
	gnutls-dev
	gtk+3.0-dev
	json-glib-dev
	libayatana-appindicator-dev
	libgcrypt-dev
	libjpeg-turbo-dev
	libsecret-dev
	libsodium-dev
	libssh-dev
	libvncserver-dev
	libxkbfile-dev
	openssl-dev>3
	pcre2-dev
	python3-dev
	samurai
	vte3-dev
	zlib-dev
	"
replaces="remmina-plugins"
subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
source="https://gitlab.com/Remmina/Remmina/-/archive/v$pkgver/Remmina-v$pkgver.tar.gz
	remmina-1.0.0-dsofix.patch
	"
options="!check" # No test suite available
builddir="$srcdir/Remmina-v$pkgver"

build() {
	LDFLAGS="$LDFLAGS -lintl" \
	cmake -G Ninja -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_APPINDICATOR=OFF \
		-DWITH_AVAHI=ON \
		-DWITH_FREERDP=ON \
		-DWITH_GCRYPT=ON \
		-DWITH_LIBSSH=ON \
		-DWITH_PTHREAD=ON \
		-DWITH_TELEPATHY=OFF \
		-DWITH_VTE=ON \
		-DWITH_ZLIB=ON \
		-DWITH_KF5WALLET=OFF \
		-DWITH_CUPS=OFF \
		-DWITH_LIBSECRET=ON \
		-DWITH_SPICE=OFF \
		-DWITH_WWW=OFF \
		-DWITH_PYTHONLIBS=ON
	cmake --build build
}

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

sha512sums="
71ead3a6a8181bff0bf4f224af70daa86aafc259d3e8e48e02773d7f4ec37a4e72a98829726652370f291f0d96f677e0385256ea9c78c01c204cbb27b630ab0a  Remmina-v1.4.35.tar.gz
8c06cfb4cd7eb74f641d6524c2fb5c941022df1d3f428c9f57a88b9714ec602b0baf962a9947aa83de3ccfaed237956743b4eb0083c4dde0cc9740b958bba007  remmina-1.0.0-dsofix.patch
"
