SUMMARY="A cooking recipe manager"
DESCRIPTION="
Recibe, written by DarkWyrm, is a cooking recipe manager. The included \
database contains around 52,000 different recipes for you to try.
"
HOMEPAGE="https://github.com/HaikuArchives/Recibe"
SOURCE_URI="git://github.com/HaikuArchives/Recibe.git#c1d5a57264d8964a2592bc9b43588b3430bd48ad"
SOURCE_URI_2="http://ports-space.haiku-files.org/recibe/recipes.db.zip#noarchive"
CHECKSUM_SHA256_2="c0732e801dceead4ad37910a51e72dda0ae608892763b62bfe5d2ed403f63d15"
LICENSE="MIT"
COPYRIGHT="2007 DarkWyrm"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"

ADDITIONAL_FILES="
	install_recipes_database.sh
	"

PROVIDES="
	recibe = $portVersion
	app:Recibe = $portVersion
	"

REQUIRES="
	haiku
	lib:libsqlite3
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libsqlite3
	"

BUILD_PREREQUIRES="
	cmd:gcc
	makefile_engine
	cmd:make
	cmd:xres
	"

USER_SETTINGS_FILES="
	settings/recipes.db
	settings/Recibe_favorites
	"
POST_INSTALL_SCRIPTS="
	$relativePostInstallDir/install_recipes_database.sh
	"

BUILD()
{
	cd sources
	make OBJ_DIR=objects \
		BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
}

INSTALL()
{
	mkdir -p $appsDir
	cp sources/objects/Recibe $appsDir
	addAppDeskbarSymlink $appsDir/Recibe
	
	mkdir -p $dataDir/recibe
	cp $sourceDir2/recipes.db.zip $dataDir/recibe
	
	mkdir -p $postInstallDir
	cp $portDir/additional-files/install_recipes_database.sh $postInstallDir
}
