SUMMARY="A time management system"
DESCRIPTION="Eventual is a personal time management system for Haiku and is \
intended to be a full-featured organizer."
HOMEPAGE="https://sourceforge.net/projects/eventual/"
COPYRIGHT="2011 Alexey Burshtein
	2001-2002 Kevin H. Patterson"
LICENSE="MIT
	BSD (3-clause)"
REVISION="2"
srcGitRev="027e4cbdc0340135406624742fa8405388725e46"
SOURCE_URI="https://github.com/HaikuArchives/Eventual/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="b0cf1dafa022930ebd4c2fddeeb79271f6038267ea77542afc7931dc4463ae08"
SOURCE_FILENAME="Eventual-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="Eventual-$srcGitRev"

ARCHITECTURES="!all x86_gcc2"

PROVIDES="
	eventual = $portVersion
	app:Eventual = $portVersion
	"
REQUIRES="
	haiku
	"

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

BUILD()
{
	cd src
	mkdir -p lib
	for LIBDIR in Libraries/* ; do
		make OBJ_DIR=objects -C $LIBDIR
	done
	make OBJ_DIR=objects -C EventEditor
	make OBJ_DIR=objects -C EventServer
	make OBJ_DIR=objects -C PreferencesPreflet
}

INSTALL()
{
	install -d $appsDir/Eventual/lib
	install -t $appsDir/Eventual/lib src/lib/*
	install -t $appsDir/Eventual \
		"src/EventEditor/objects/Eventual Editor" \
		"src/EventServer/objects/Eventual Server" \
		"src/PreferencesPreflet/objects/Eventual Preferences"

	install -d $dataDir/deskbar/menu/Applications/Eventual
	addAppDeskbarSymlink "$appsDir/Eventual/Eventual Editor" Eventual
	addAppDeskbarSymlink "$appsDir/Eventual/Eventual Server" Eventual
	addAppDeskbarSymlink "$appsDir/Eventual/Eventual Preferences" Eventual
}
