SUMMARY="A client for the LiveJournal online journalling community"
DESCRIPTION="AliveJournal is a revamped version of Simon Huet's original client."
HOMEPAGE="https://github.com/grahams/alivejournal"
COPYRIGHT="2000 Simon Huet
	2010 Sean Graham"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="c25a118cde4d97f2d0d514732b548e592cac9c29"
SOURCE_URI="https://github.com/grahams/alivejournal/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="675345bbadccda762fd87c1f8d133955af41b5e36584b2d9d497246f361e563c"
SOURCE_FILENAME="alivejournal-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="alivejournal-$srcGitRev"

ARCHITECTURES="all"

PROVIDES="
	alivejournal = $portVersion
	app:AliveJournal = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++
	cmd:make
	cmd:sed
	"

PATCH()
{
	sed -i -e '/^LIBS=/ s/stdc++/$(STDCPPLIBS)/' Makefile
}

BUILD()
{
	make OBJ_DIR=objects
}

INSTALL()
{
	install -d $appsDir $docDir
	install -t $appsDir objects/AliveJournal
	addAppDeskbarSymlink $appsDir/AliveJournal
	install -t $docDir README
	sed -i -n -e '/^------------$/q;p' $docDir/README
}
