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/" 
SRC_URI="git+https://github.com/threedeyes/rdesktop.git#dc04b43ccb443f8245e5cda69ab063624e0d6f8c"
COPYRIGHT="1999-2013 Matthew Chapman"
LICENSE="GNU GPL v3"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"

PROVIDES="
	rdesktop = $portVersion
	cmd:rdesktop = $portVersion
	"

BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	cmd:mkdepend
	"

BUILD_REQUIRES="
	haiku_devel >= $haikuVersion
	devel:libssl
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libcrypto
	lib:libssl
	"


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
}
