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="https://github.com/pulkomandy/APlayer"
COPYRIGHT="1994-2002 Polycode
	2011-2017 Adrien Destugues"
LICENSE="Artistic"
REVISION="5"
srcGitRev="6a9ce3d3950d929d3a071431ca08c38cc84b1587"
SOURCE_URI="https://github.com/pulkomandy/APlayer/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="e0ec74ca68da5e1931dc29a75bbcf8cdfc60fdd2e1977b79ecef9ff842db212d"
SOURCE_DIR="APlayer-$srcGitRev"

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

PROVIDES="
	aplayer$secondaryArchSuffix = $portVersion
	app:APlayer = $portVersion
	lib:APlayerKit = $portVersion
	lib:PolyKit = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgme$secondaryArchSuffix
	lib:libsanta$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libgme$secondaryArchSuffix
	devel:libsanta$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:nasm
	"

BUILD()
{
	make
}

INSTALL()
{
	mkdir -p $appsDir/APlayer

	cp -r dist/* $appsDir/APlayer

	addAppDeskbarSymlink $appsDir/APlayer/APlayer
}
