SUMMARY="XMPP client for Haiku Operating System."
DESCRIPTION="
	Haiku Chat is tiny, about 300KB XMPP client. It supports core XMPP protocol, \
	multi-user chat, Google accounts, Psi bookmarks, In-band registration and \
	other features. It is written for Haiku, free open-source operating system \
	inspired  by BeOS. Haiku Chat is simplest and smallest client that supports \
	XMPP Advanced Client 2009 profile.
	"
HOMEPAGE="http://synrc.com/client/chat/haiku/"
SRC_URI="git+https://github.com/devaspot/chat.git"
LICENSE="MIT"
COPYRIGHT="2012 Maxim Sokhatsky"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	chat = $portVersion
	app:chat = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libssl$secondaryArchSuffix
	lib:libexpat$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libssl$secondaryArchSuffix
	devel:libexpat$SecondaryArchSuffix
	"

BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:which
	"

BUILD()
{
	cd src
	make -f Makefile.gcc2 BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
	chmod 755 Chat
}

INSTALL()
{
	mkdir -p $appsDir
	cp src/Chat $appsDir/Chat
	addAppDeskbarSymlink $appsDir/Chat "Chat"
}
