SUMMARY="Robust, somewhat scalable, cross-platform client-server solution"
DESCRIPTION="
The MUSCLE system is a robust, somewhat scalable, cross-platform client-server \
solution for dynamic distributed applications for Haiku and other operating \
systems. It allows (n) client programs (each of which may be running on a \
separate computer and/or under a different OS) to communicate with each other \
in a many-to-many message-passing style. It employs a central server to which \
client programs may connect or disconnect at any time (this design is similar \
to other client-server systems such as Quake servers, IRC servers, and Napster \
servers, but more general in application). In addition to the client-server \
system, MUSCLE contains classes to support peer-to-peer message streaming \
connections, as well as some handy miscellaneous utility classes.
"
COPYRIGHT="2000-2009 Meyer Sound Laboratories Inc."
LICENSE="BSD (3-clause)"
HOMEPAGE="https://public.msli.com/lcs/muscle/index.html"
SRC_URI="https://public.msli.com/lcs/muscle/muscle6.00.zip"
CHECKSUM_SHA256="b12abe12b5cc4aa93126f86ae07a4bcd02ee8d89d692789435debd5becc53437"
REVISION="1"

ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"

PROVIDES="
	muscle = $portVersion
	cmd:muscled$secondaryArchSuffix = $portVersion
	cmd:admin$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libz$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"
	
SOURCE_DIR="muscle"

BUILD()
{
	cd server
	make $jobArgs BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
}

INSTALL()
{
	mkdir -p $binDir
	
	cd server
	cp admin muscled $binDir
}
