SUMMARY="Caya is a multiprotocol IM client"
DESCRIPTION="
Caya is a multiprotocol chat client for Haiku. It supports msn, aim, jabber, \
google talk, and facebook.
"
HOMEPAGE="http://www.versut.com/caya/"
SOURCE_URI="https://github.com/Barrett17/Caya/archive/caya-0.0.3.tar.gz"
CHECKSUM_SHA256="cb4580557671cdd7cc74d8cfd1301e407d266f71145dea8aa96d5c42daec397a"

REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="
	2009-2011 Andrea Anzani
	2010-2015 Dario Casalinuovo
	2009-2011 Pier Luigi Fiorini
	"

ARCHITECTURES="x86_gcc2 x86 ?x86_64"
# no secondary architectures due to Deskbar's replicant handeling.
PROVIDES="
	caya = $portVersion
	app:Caya
	"
REQUIRES="
	haiku
	lib:libz
	lib:libexpat
	lib:libssl
	"
BUILD_REQUIRES="
	haiku_devel
	devel:libexpat
	devel:libssl
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:jam
	cmd:ld
	cmd:tr
	cmd:which
	"
SOURCE_DIR=Caya-caya-0.0.3

BUILD()
{
	mkdir -p $sourceDir/generated/objects-haiku-x86-gcc2-release/application
	echo $portVersion | tr -d . > $sourceDir/generated/objects-haiku-x86-gcc2-release/application/svn_revision
	./configure
	jam $jobArgs -sDEBUG=0
}

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

	cp generated/distro-haiku-*-release/Caya $appsDir/Caya
	cp generated/distro-haiku-*-release/aim $appsDir/Caya/protocols
	cp generated/distro-haiku-*-release/msn $appsDir/Caya/protocols
	cp generated/distro-haiku-*-release/gtalk $appsDir/Caya/protocols
	cp generated/distro-haiku-*-release/facebook $appsDir/Caya/protocols
	cp generated/distro-haiku-*-release/jabber $appsDir/Caya/protocols
	cp generated/distro-haiku-*-release/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
}
