DESCRIPTION="jgmod is a MOD music playing add-on library for Allegro" 
HOMEPAGE="http://guan.is-a-geek.com/jgmod/jgmod.html" 
COPYRIGHT="1997-2002 Guan Foo Wah"
LICENSE="JGMOD"
SRC_URI="http://guan.is-a-geek.com/jgmod/jgmod.zip"
REVISION="2"
STATUS_HAIKU="stable"
DEPEND="media-libs/allegro >= 4.4"
CHECKSUM_MD5="0e6e540ffadced9283251a7f86c106fe"

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

INSTALL()
{
	cd jgmod/src
    if [ -n ${DESTDIR} ];then
		mkdir -p ${DESTDIR}/boot/common/lib
		mkdir -p ${DESTDIR}/boot/common/include
		make install \
		CPLIBDEST=${DESTDIR}/boot/common/lib \
		CPINCDEST=${DESTDIR}/boot/common/include
	else
		make install \
		CPLIBDEST=/boot/common/lib \
		CPINCDEST=/boot/common/include
	fi
}
