SUMMARY="An open source client for Windows Remote Desktop Services"
DESCRIPTION="rdesktop is an open source client for Windows Remote Desktop \
Services, capable of natively speaking Remote Desktop Protocol (RDP) in order \
to present the user's Windows desktop. rdesktop is known to work with Windows \
versions such as NT 4 Terminal Server, 2000, XP, 2003, 2003 R2, Vista, 2008,\
 7, and 2008 R2."
HOMEPAGE="http://rdesktop.org"
COPYRIGHT="1999-2013 Matthew Chapman"
LICENSE="GNU GPL v3"
REVISION="5"
SOURCE_URI="http://prdownloads.sourceforge.net/rdesktop/rdesktop-$portVersion.tar.gz"
CHECKSUM_SHA256="1f12562c0dc1c599d1c3d2ac4829d229763744fe7aef879c8eaaa5abae8edcb3"
PATCHES="
	rdesktop-$portVersion.patchset
	rdesktop-$portVersion-openssl-1.1.patch
	"

# unmaintaned.
ARCHITECTURES="?all"

PROVIDES="
	rdesktop = $portVersion
	cmd:rdesktop = $portVersion
	"
REQUIRES="
	haiku
	lib:libcrypto
	lib:libssl
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libssl
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	"

BUILD()
{
	cd haiku
	makefile=makefile_gcc4
	if [[ "$buildArchitecture" == *gcc2* ]]; then
		makefile=makefile_gcc2
	fi
	make -f $makefile
}

INSTALL()
{
	mkdir -p $binDir
	cp haiku/rdesktop $binDir
}
