SUMMARY="A Haiku-native HTTP/1.1 server"
DESCRIPTION="RobinHood is a native web server containing many features like \
authentication, virtual hosts, virtual folders, CGI, SSI, Ranges, and much more\
!"
HOMEPAGE="https://haikuarchives.github.io/RobinHood/"
COPYRIGHT="1999-2001 The Robin Hood Development Team
	2015 Puck Meerburg"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/HaikuArchives/RobinHood/archive/a1a81cddf007bd81d53c3b9d5fc23197c0da554d.tar.gz"
CHECKSUM_SHA256="37e297cf2c73907ec7694fa697c7ac765f6c068aac2effc24e4b89a7e770c556"
SOURCE_DIR="RobinHood-a1a81cddf007bd81d53c3b9d5fc23197c0da554d"

ARCHITECTURES="?all x86_gcc2"

PROVIDES="
	robinhood = $portVersion
	app:RHConsole = $portVersion
	app:RobinHoudini = $portVersion
	cmd:rhdaemon = $portVersion
	cmd:rhlog = $portVersion
	"
REQUIRES="
	haiku
	libhttp
	"

BUILD_REQUIRES="
	haiku_devel
	libhttp_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	"

BUILD()
{
	cd source
	make $jobArgs
	cd ../RobinHoudini
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	cd source
	make install
	cd server
	mkdir -p $binDir $appsDir $addOnsDir
	cp rhdaemon $binDir
	cp RHLog $binDir/rhlog
	cp RHConsole $appsDir
	cp -r robin_hood_modules $addOnsDir
	addAppDeskbarSymlink $appsDir/RHConsole Robin\ Hood
	cd ../../RobinHoudini
	cp objects/RHoudini $appsDir/RobinHoudini
	mkdir -p $dataDir/deskbar/menu/Desktop\ applets
	symlinkRelative -s $appsDir/RobinHoudini \
		$dataDir/deskbar/menu/Desktop\ applets/Robin\ Houdini
}
