SUMMARY="Caya is a multiprotocol IM client." 
HOMEPAGE="http://dev.osdrawer.net/projects/caya" 
SRC_URI="git+https://github.com/Barrett17/Caya.git#00440a3ffcafe58360638ed35c2be1e50bb63c65"
REVISION="2"
ARCHITECTURES="x86 x86_gcc2"

PROVIDES="
	caya = $portVersion
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libz
	lib:libexpat
	lib:libssl
	"
BUILD_REQUIRES="
	devel:libexpat
	devel:libssl
	devel:libz
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:gcc
	cmd:ld
	cmd:jam
	cmd:which
	cmd:tr
	"

#PATCHES="caya-$portVersion.patchset"
BUILD()
{
	mkdir -p $sourceDir/generated/objects-haiku-x86-gcc2-debug/application
	echo $portVersion | tr -d . > $sourceDir/generated/objects-haiku-x86-gcc2-debug/application/svn_revision
	./configure
	jam
}

INSTALL()
{
	mkdir -p $appsDir/Caya
	mkdir -p $appsDir/Caya/smileys
	mkdir -p $appsDir/Caya/protocols
	mkdir -p $includeDir/caya/

	cp generated/distro-haiku-*-debug/Caya $appsDir/Caya
	cp generated/distro-haiku-*-debug/aim $appsDir/Caya/protocols
	cp generated/distro-haiku-*-debug/msn $appsDir/Caya/protocols
	cp generated/distro-haiku-*-debug/gtalk $appsDir/Caya/protocols
	cp generated/distro-haiku-*-debug/facebook $appsDir/Caya/protocols
	cp generated/distro-haiku-*-debug/jabber $appsDir/Caya/protocols
	cp generated/distro-haiku-*-debug/yahoo $appsDir/Caya/protocols
	cp smileys/*.gif smileys/settings.xml $appsDir/Caya/smileys
	cp application/Caya.h $includeDir/caya/
	cp application/CayaProtocol.h $includeDir/caya/
	cp application/CayaConstants.h $includeDir/caya/
	cp application/CayaProtocolMessages.h $includeDir/caya/

	addAppDeskbarSymlink $appsDir/Caya/Caya
}

LICENSE="MIT"
COPYRIGHT="
	2009-2011 Andrea Anzani
	2009-2011 Pierluigi Fiorini
	2010-2011 Oliver Ruiz Dorantes
	2011-2012 Casalinuovo Dario
	"
DESCRIPTION="
Caya is a multiprotocol chat client for Haiku. It supports msn, aim, jabber, \
google talk, and facebook.
"
