SUMMARY="A Device Firmware Update based USB programmer for Atmel chips"
DESCRIPTION="dfu-programmer is an implementation of the Device Firmware \
Upgrade class USB driver that enables firmware upgrades for various USB \
enabled (with the correct bootloader) Atmel chips.  This program was created \
because the Atmel "FLIP" program for flashing devices does not support \
flashing via USB on Linux, and because standard DFU loaders do not work for \
Atmel's chips.

Check out the Atmel website for more information.  They are kind enough to \
provide generally correct specifications this implementation is based on.

The project website is http://dfu-programmer.sourceforge.net and you can use \
that to check for updates."
HOMEPAGE="http://dfu-programmer.sourceforge.net"
COPYRIGHT="Weston Schmidt"
LICENSE="GNU GPL v2"
REVISION="4"
SOURCE_URI="http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/$portVersion/dfu-programmer-$portVersion.tar.gz"
CHECKSUM_SHA256="0120966a424dd98124962055750e90cbd6c7b6b0fbf5b187bf435daa0a24af65"
SOURCE_DIR="dfu-programmer-$portVersion"
PATCHES="dfu-programmer-$portVersion.patch"

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

PROVIDES="
	dfu_programmer$secondaryArchSuffix = $portVersion
	cmd:dfu_programmer$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libusb_1.0$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libusb_1.0$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	sh ./bootstrap.sh
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
