# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2

require github [ user="FreeRDP" tag="v${PV/_rc/-rcgit.}" ]
require cmake [ api=2 ]
require gtk-icon-cache

SUMMARY="A GTK+ RDP, VNC, XDMCP and SSH client"
DESCRIPTION="
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistant user interface. Currently RDP, VNC, SPICE, NX, XDMCP and SSH are supported.
"
HOMEPAGE+=" http://remmina.org/"

LICENCES="GPL-2"
MYOPTIONS="ssh"

DEPENDENCIES="
    build:
    	dev-util/intltool
    	sys-devel/gettext
    	virtual/pkg-config
    build+run:
        core/json-glib
        dev-libs/glib:2[>=2.30]
        dev-libs/libgcrypt
        dev-libs/libsecret:1
        gnome-desktop/libsoup:2.4
        net-libs/libvncserver
        net-remote/FreeRDP
        x11-libs/cairo
        x11-libs/gdk-pixbuf:2.0
        x11-libs/gtk+:3
        x11-libs/libX11
        x11-libs/libxkbfile
        ssh? (
            net-libs/libssh
            dev-libs/vte:2.91
        )
"

BUGS_TO="hasufell@posteo.de"

CMAKE_SRC_CONFIGURE_PARAMS=(
    # on
    -DWITH_FREERDP=ON
    -DWITH_GCRYPT=ON
    -DWITH_GETTEXT=ON
    -DWITH_LIBSECRET=ON
    -DWITH_LIBVNCSERVER=ON
    -DWITH_TRANSLATIONS=ON

    # off
    -DWITH_APPINDICATOR=OFF
    -DWITH_AVAHI=OFF
    -DWITH_SPICE=OFF
    -DWITH_TELEPATHY=OFF
)

CMAKE_SRC_CONFIGURE_OPTION_WITHS=(
    "ssh LIBSSH"
    "ssh VTE"
)