summaryrefslogtreecommitdiff
path: root/prom-exporter-nut/Makefile
blob: ca57d3ec54f2695f9c4e91bf911ddc59ecc4aa2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
VERSION := "invalid"
GITHUB_BASEURL := "https://github.com/DRuggeri/nut_exporter/releases/download"

.PHONY: clean

all: i386/nut_exporter amd64/nut_exporter arm64/nut_exporter

%/nut_exporter: nut_exporter-v$(VERSION)-linux-%
	mkdir -p $(shell echo $@ | sed 's#/.*##')
	cp $< $@

nut_exporter-v$(VERSION)-linux-%:
	wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/v$(VERSION)/$(shell echo $@ | sed s/i386/386/)" -O "$@"
	sha256sum -c --ignore-missing sha256sums.txt

clean:
	rm -rf i386
	rm -rf amd64
	rm -rf arm64
	rm -f nut_exporter-v$(VERSION).linux-*