summaryrefslogtreecommitdiff
path: root/prom-exporter-nut/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'prom-exporter-nut/Makefile')
-rw-r--r--prom-exporter-nut/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/prom-exporter-nut/Makefile b/prom-exporter-nut/Makefile
new file mode 100644
index 0000000..ea0ffa0
--- /dev/null
+++ b/prom-exporter-nut/Makefile
@@ -0,0 +1,19 @@
+VERSION := 2.2.1
+GITHUB_BASEURL := "https://github.com/DRuggeri/nut_exporter/releases/download"
+
+.PHONY: clean
+
+all: i386/nut_exporter amd64/nut_exporter
+
+%/nut_exporter: nut_exporter-v$(VERSION)-linux-%
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ cp $< $@
+
+nut_exporter-v$(VERSION)-linux-%:
+ wget -nc "$(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 -f nut_exporter-v$(VERSION).linux-*