
include $(CURDIR)/../Makefile.inc

VERSION = 1.0

TARGET32 = arduino32-$(VERSION).tgz
SOURCE32 = http://arduino.googlecode.com/files/arduino-$(VERSION)-linux.tgz
TARGET64 = arduino64-$(VERSION).tgz
SOURCE64 = http://arduino.googlecode.com/files/arduino-$(VERSION)-linux64.tgz

all:		download manifest
download:	$(PACKAGES)/$(TARGET32) $(PACKAGES)/$(TARGET64)
manifest:	$(MANIFESTS)/arduino.pp

$(PACKAGES)/$(TARGET32):
	@umask 022; echo $@; \
	test -f $@ || curl -o $@ $(SOURCE32)

$(PACKAGES)/$(TARGET64):
	@umask 022; echo $@; \
	test -f $@ || curl -o $@ $(SOURCE64)

$(MANIFESTS)/arduino.pp: $(PACKAGES)/$(TARGET32) $(PACKAGES)/$(TARGET64)
	@umask 022; echo $@; \
	echo '$$arduino32_package_latest = "$(TARGET32)"' > $@ && \
	echo '$$arduino64_package_latest = "$(TARGET64)"' >> $@
