summaryrefslogtreecommitdiff
path: root/prom-exporter-ipmi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'prom-exporter-ipmi/Makefile')
-rw-r--r--prom-exporter-ipmi/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/prom-exporter-ipmi/Makefile b/prom-exporter-ipmi/Makefile
new file mode 100644
index 0000000..2e8dd5b
--- /dev/null
+++ b/prom-exporter-ipmi/Makefile
@@ -0,0 +1,18 @@
+VERSION := "invalid"
+GITHUB_BASEURL := "https://github.com/prometheus-community/ipmi_exporter/releases/download"
+
+.PHONY: clean
+
+all: amd64/ipmi_exporter
+
+%/ipmi_exporter: ipmi_exporter-$(VERSION).linux-%.tar.gz
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1
+
+ipmi_exporter-$(VERSION).linux-%.tar.gz:
+ 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 amd64
+ rm -f ipmi_exporter-$(VERSION).linux-*.tar.gz