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

BRANCH   = default
AHSOURCE = https://bitbucket.org/clarifiednetworks/abusehelper/get/$(BRANCH).tar.gz
AHTARGET = abusehelper-$(BRANCH)-$(TIMESTAMP).tar.gz
IKSOURCE = https://bitbucket.org/clarifiednetworks/idiokit/get/$(BRANCH).tar.gz
IKTARGET = idiokit-$(BRANCH)-$(TIMESTAMP).tar.gz

all:      tarball manifest
tarball:  $(PACKAGES)/$(AHTARGET) $(PACKAGES)/$(IKTARGET)
manifest: $(MANIFESTS)/abusehelper.pp

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

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

$(MANIFESTS)/abusehelper.pp: $(PACKAGES)/$(AHTARGET) $(PACKAGES)/$(IKTARGET)
	@umask 022; echo $@; \
	echo '$$abusehelper_package_latest = "$(AHTARGET)"' > $@ && \
	echo '$$idiokit_package_latest = "$(IKTARGET)"' >> $@
