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

VERSION = 3.0.7.1

TARGET32 = teamspeak3-server_linux-x86-$(VERSION).tar.gz
SOURCE32 = http://ftp.4players.de/pub/hosted/ts3/releases/$(VERSION)/teamspeak3-server_linux-x86-$(VERSION).tar.gz
TARGET64 = teamspeak3-server_linux-amd64-$(VERSION).tar.gz
SOURCE64 = http://ftp.4players.de/pub/hosted/ts3/releases/$(VERSION)/teamspeak3-server_linux-amd64-$(VERSION).tar.gz

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

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

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

$(MANIFESTS)/teamspeak.pp: $(PACKAGES)/$(TARGET32) $(PACKAGES)/$(TARGET64)
	@umask 022; echo $@; \
	echo '$$teamspeak32_package_latest = "$(TARGET32)"' > $@ && \
	echo '$$teamspeak64_package_latest = "$(TARGET64)"' >> $@
