SUMMARY="A GUI frontend for burning CDs"
DESCRIPTION="BurnItNow is a GUI frontend for CDRecord and mkisofs. \
It supports Audio CD, MixCD (on the fly), Data CD (on the fly, multisession), \
BootableCD and burning an BFS image."
HOMEPAGE="https://github.com/HaikuArchives/BurnItNow"
SOURCE_URI="https://github.com/HaikuArchives/BurnItNow/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="7db12d261ddebcbfe82e2ab5e7aed4227caef476f01488a1ccec4f58287833d2"
SOURCE_DIR="BurnItNow-$portVersion"
REVISION="1"
COPYRIGHT="2010-2014 BurnItNow Team"
LICENSE="MIT"

ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
    # x86_gcc2 is fine as primary target architecture as long as we're building
    # for a different secondary architecture.
    ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
    ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	burnitnow$secondaryArchSuffix = $portVersion
	app:BurnItNow = $portVersion
	"

REQUIRES="
	haiku
	cmd:cdrecord
	cmd:mkisofs
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"

BUILD_PREREQUIRES="
	makefile_engine
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	"

BUILD()
{
	cd Source
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	cd Source
	mkdir -p $appsDir
	cp objects/BurnItNow $appsDir
	addAppDeskbarSymlink $appsDir/BurnItNow
}
