summaryrefslogtreecommitdiff
path: root/prom-exporter-mikrotik/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'prom-exporter-mikrotik/Makefile')
-rw-r--r--prom-exporter-mikrotik/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/prom-exporter-mikrotik/Makefile b/prom-exporter-mikrotik/Makefile
new file mode 100644
index 0000000..0604247
--- /dev/null
+++ b/prom-exporter-mikrotik/Makefile
@@ -0,0 +1,19 @@
+VERSION := 1.0.11
+GITHUB_BASEURL := "https://github.com/nshttpd/mikrotik-exporter/releases/download"
+
+.PHONY: clean
+
+all: i386/mikrotik_exporter amd64/mikrotik_exporter
+
+%/mikrotik_exporter: mikrotik-exporter_linux_%
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ cp $< $@
+
+mikrotik-exporter_linux_%:
+ wget -nc "$(GITHUB_BASEURL)/$(VERSION)/$(shell echo $@ | sed s/i386/386/)" -O "$@"
+ sha256sum -c --ignore-missing sha256sums.txt
+
+clean:
+ rm -rf i386
+ rm -rf amd64
+ rm -f mikrotik-exporter_linux-*