SUMMARY="AVRDUDE - AVR Downloader/UploaDEr"
DESCRIPTION="
AVRDUDE is an utility to download/upload/manipulate the ROM and EEPROM contents
of AVR microcontrollers using the in-system programming technique (ISP).
"
HOMEPAGE="http://www.nongnu.org/avrdude/"
LICENSE="
	GNU GPL v2
	"
COPYRIGHT="
	2003-2013 Brian S. Dean <bsd@bdmicro.com>
"
SRC_URI="http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1.tar.gz"
CHECKSUM_MD5="346ec2e46393a54ac152b95abf1d9850"
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"
fi
SECONDARY_ARCHITECTURES="x86"

GLOBAL_WRITABLE_FILES="
	settings/avrdude.conf keep-old
"

PROVIDES="
	avrdude = $portVersion
	cmd:avrdude$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libusb_1.0$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libusb_1.0$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:automake
	cmd:autoconf
	cmd:make
	cmd:yacc
	cmd:flex
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	aclocal
	automake
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
