SUMMARY="jgmod is a MOD music playing add-on library for Allegro" 
DESCRIPTION="
JGMOD is a mod library for MOD musics. It is built on top of Allegro lower
level digital sound routines. Currently supports MOD, S3M, XM, Unreal
S3M (in UMX extension), and JGM under DJGPP, Mingw32, MSVC, Linux and BEOS.
"

HOMEPAGE="http://guan.is-a-geek.com/jgmod/jgmod.html" 
COPYRIGHT="1997-2002 Guan Foo Wah"
LICENSE="JGMOD"
SOURCE_URI="http://guan.is-a-geek.com/jgmod/jgmod.zip"
CHECKSUM_SHA256="5d34c446904ddf2c6e3ee2272e6d4a9e6b1b4e59701237c5f4c961999623c77a"
SOURCE_FILENAME="jgmod-$portVersion.zip"
REVISION="2"
ARCHITECTURES="x86_gcc2"

PROVIDES="
	jgmod = $portVersion
	lib:libjgmod
	"
REQUIRES="
	lib:liballeg >= 4.4
	"

BUILD_REQUIRES="
	haiku_devel
	devel:liballeg
	"
BUILD_PREREQUIRES="
	cmd:find
	cmd:gcc
	cmd:make
	"

SOURCE_DIR="jgmod"
BUILD()
{
	chmod 777 ./fixbe.sh
	./fixbe.sh
	cd src
	make
}

INSTALL()
{
	cd src
	mkdir -p $libDir $includeDir
	make install CPLIBDEST=$libDir CPINCDEST=$includeDir

	prepareInstalledDevelLib libjgmod
	packageEntries devel $developDir
}

PROVIDES_devel="
	devel:libjgmod
	"

REQUIRES_devel="
	jgmod == $portVersion base
	"
