SUMMARY="A commandline client for Music Player Daemon"
DESCRIPTION="
Music Player Daemon (MPD) is a flexible, powerful, server-side application \
for playing music. Through plugins and libraries it can play a variety \
of sound files while being controlled by its network protocol.

MPC is a commandline client for Music Player Daemon."
HOMEPAGE="http://www.musicpd.org/"
SOURCE_URI="http://www.musicpd.org/download/mpc/0/mpc-0.26.tar.xz"
CHECKSUM_SHA256="20735f7173cce56bec50c1d8b4633751052dc68365b29a6113206dc1cdc6e242"
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2014 The Music Player Daemon Project"
REVISION="1"
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="
	musicpc$secondaryArchSuffix = $portVersion
	cmd:mpc$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libmpdclient$secondaryArchSuffix
	glib2_x86 >= 2
	lib:libiconv$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	boost${secondaryArchSuffix}_devel
	devel:libmpdclient$secondaryArchSuffix
	glib2${secondaryArchSuffix}_devel
	devel:libiconv$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:gcc${secondaryArchSuffix}
	cmd:ld${secondaryArchSuffix}
	cmd:make
	cmd:pkg_config${secondaryArchSuffix}
	cmd:ranlib
	cmd:sed
	cmd:find
	"

SOURCE_DIR="mpc-$portVersion"

BUILD()
{
	export PKG_CONFIG_LIBDIR="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"

	runConfigure ./configure

	make $jobArgs
}

INSTALL()
{
	export PKG_CONFIG_LIBDIR="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"

	make install
}
