SUMMARY="A simple graphical FTP client"
DESCRIPTION="FtpPositive is a simple graphical FTP client."
HOMEPAGE="https://github.com/HaikuArchives/FtpPositive"
COPYRIGHT="2007 momoziro
	2013 Kacper Kasper
	2014 Frederik Modeen
	2017 Augustin Cavalier, Joel Koreth, Owen Pan, Sergei Reznikov
	2018 Humdinger, Janus, Ryo Kenrie Wongso, Xiang Fan"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4600cee1f344b5ce0144ee34e8f91b00345996752e765404083b9b6f1209ae9d"
SOURCE_DIR="FtpPositive-$portVersion"

ARCHITECTURES="all"

PROVIDES="
	ftppositive = $portVersion
	app:FtpPositive = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel >= r1~alpha4_pm_hrev52220
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++
	cmd:make
	"

BUILD()
{
	cd src
	make $jobArgs OBJ_DIR=objects
	make OBJ_DIR=objects bindcatalogs

	cd add-ons/encoders
	make $jobArgs -f Makefile_euc
	make $jobArgs -f Makefile_jis
}

INSTALL()
{
	appFolder=$appsDir/FtpPositive
	addonFolder=$appFolder/add-ons/encoders

	mkdir -p $addonFolder
	cp -a src/add-ons/encoders/EUC-JP $addonFolder
	cp -a src/add-ons/encoders/Shift-JIS $addonFolder
	cp -a src/objects/FtpPositive $appFolder

	addAppDeskbarSymlink $appFolder/FtpPositive
}
