SUMMARY="Native Twitter client for Haiku"
DESCRIPTION="HaikuTwitter is an open-source Twitter client for Haiku. It's \
based off the open-source TwitCurl library."
COPYRIGHT="2012 Martin Pedersen"
LICENSE="MIT"
HOMEPAGE="https://github.com/HaikuArchives/HaikuTwitter" 
SOURCE_URI="https://github.com/HaikuArchives/HaikuTwitter/archive/918dd954b6db3c5ed476b3a4826910992f3b4566.tar.gz"
CHECKSUM_SHA256="bc330cb15c8e10362306eef7d85228f5dee08db667d16a15c0a5245f6013b1e1"
SOURCE_DIR="HaikuTwitter-918dd954b6db3c5ed476b3a4826910992f3b4566"
REVISION="2"

ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	haikutwitter$secondaryArchSuffix = $portVersion
	app:HaikuTwitter = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcurl$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	mkdir -p $appsDir
	cp objects/HaikuTwitter $appsDir
	
	addAppDeskbarSymlink $appsDir/HaikuTwitter
}
