VERSION := "invalid" GITHUB_BASEURL := "https://github.com/jryberg/mosquitto-exporter/releases/download" .PHONY: clean all: amd64/mosquitto-exporter arm64/mosquitto-exporter %/mosquitto-exporter: mosquitto-exporter_$(VERSION)_linux_%.tar.gz mkdir -p $(shell echo $@ | sed 's#/.*##') tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" mosquitto-exporter_$(VERSION)_linux_%.tar.gz: wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/v$(VERSION)/$@" -O "$@" sha256sum -c --ignore-missing sha256sums.txt clean: rm -rf amd64 rm -rf arm64 rm -f mosquitto_exporter-$(VERSION).linux-*.tar.gz