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