SUMMARY="A player for Amiga modules and other formats"
DESCRIPTION="APlayer is a module player and can play a lot of different music file formats, from Amiga and elsewhere."
HOMEPAGE="http://pulkomandy.tk/projects/APlayer"
SRC_URI="svn://pulkomandy.tk/APlayer/trunk"
REVISION="2"
LICENSE="Artistic"
COPYRIGHT="
	1994-2002 Polycode
	2011-2012 Adrien Destugues
"

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

PROVIDES="
	aplayer$secondaryArchSuffix = $portVersion
	app:aplayer$secondaryArchSuffix = $portVersion
	lib:PolyKit = $portVersion
	lib:APlayerKit = $portVersion
"
REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
	cmd:g++$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:nasm$secondaryArchSuffix
"
SOURCE_DIR="trunk"

PATCHES="
	aplayer.patch
	aplayer_2.patch
"
BUILD()
{
	cd Master
	make
	cd ..
}

INSTALL()
{
	aplayerDir=$appsDir/APlayer
	mkdir -p $aplayerDir $aplayerDir/add-ons $aplayerDir/Documentation $aplayerDir/lib
	
	cp APlayer/bin/BeOS_/APlayer $aplayerDir
	cp -r Documentation/* $aplayerDir/Documentation
	cp -r APlayer/bin/BeOS_/add-ons/* $aplayerDir/add-ons
	cp APlayer/bin/BeOS_/lib/APlayerKit.so $aplayerDir/lib
	cp PolyKit/bin/BeOS/PolyKit.so $aplayerDir/lib

	addAppDeskbarSymlink $aplayerDir/APlayer
}
