summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-12-17 23:33:59 +0100
committerChristian Pointner <equinox@spreadspace.org>2023-12-17 23:33:59 +0100
commitc102a213d6b43d57653703093f431ab8bcbb8cea (patch)
tree0c707d2beabde331c9a4e9ec806faff76f9cc3cc
parentupdate prom-server package (diff)
add mosuqitto-exporter
-rw-r--r--prom-exporter-mosquitto/Makefile19
-rw-r--r--prom-exporter-mosquitto/debian/changelog5
-rw-r--r--prom-exporter-mosquitto/debian/compat1
-rw-r--r--prom-exporter-mosquitto/debian/control12
-rw-r--r--prom-exporter-mosquitto/debian/install1
-rwxr-xr-xprom-exporter-mosquitto/debian/rules16
-rw-r--r--prom-exporter-mosquitto/debian/source/format1
-rw-r--r--prom-exporter-mosquitto/sha256sums.txt2
8 files changed, 57 insertions, 0 deletions
diff --git a/prom-exporter-mosquitto/Makefile b/prom-exporter-mosquitto/Makefile
new file mode 100644
index 0000000..132eeb7
--- /dev/null
+++ b/prom-exporter-mosquitto/Makefile
@@ -0,0 +1,19 @@
+VERSION := "invalid"
+GITHUB_BASEURL := "https://github.com/jryberg/mosquitto-exporter/releases/download"
+
+.PHONY: clean
+
+all: amd64/mosquitto-exporter arm64/mosquitto-exporter
+
+%/mosquitto-exporter: mosquitto-exporter_$(VERSION)_linux_%.tar.gz
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<"
+
+mosquitto-exporter_$(VERSION)_linux_%.tar.gz:
+ wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/v$(VERSION)/$@" -O "$@"
+ sha256sum -c --ignore-missing sha256sums.txt
+
+clean:
+ rm -rf amd64
+ rm -rf arm64
+ rm -f mosquitto_exporter-$(VERSION).linux-*.tar.gz
diff --git a/prom-exporter-mosquitto/debian/changelog b/prom-exporter-mosquitto/debian/changelog
new file mode 100644
index 0000000..7e2c455
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/changelog
@@ -0,0 +1,5 @@
+prom-exporter-mosquitto (0.7.2-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Sun, 17 Dec 2023 23:31:49 +0100
diff --git a/prom-exporter-mosquitto/debian/compat b/prom-exporter-mosquitto/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/prom-exporter-mosquitto/debian/control b/prom-exporter-mosquitto/debian/control
new file mode 100644
index 0000000..f607b3c
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/control
@@ -0,0 +1,12 @@
+Source: prom-exporter-mosquitto
+Maintainer: Christian Pointner <equinox@spreadspace.org>
+Section: utils
+Priority: optional
+Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 9), wget, ca-certificates
+
+Package: prom-exporter-mosquitto
+Architecture: amd64 arm64
+Depends: ${misc:Depends}
+Conflicts: prometheus-mosquitto-exporter
+Description: prometheus mosquitto-exporter (binary only)
diff --git a/prom-exporter-mosquitto/debian/install b/prom-exporter-mosquitto/debian/install
new file mode 100644
index 0000000..3b9b80e
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/install
@@ -0,0 +1 @@
+usr/bin/prometheus-mosquitto-exporter
diff --git a/prom-exporter-mosquitto/debian/rules b/prom-exporter-mosquitto/debian/rules
new file mode 100755
index 0000000..5f6b10e
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+include /usr/share/dpkg/pkg-info.mk
+%:
+ dh $@
+
+override_dh_auto_configure:
+
+override_dh_auto_build:
+ make VERSION=$(DEB_VERSION_UPSTREAM) $(DEB_BUILD_ARCH)/mosquitto-exporter
+
+override_dh_auto_install:
+ install -d $$(pwd)/debian/tmp/usr/bin/
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/mosquitto-exporter $$(pwd)/debian/tmp/usr/bin/prometheus-mosquitto-exporter
+
+override_dh_auto_clean:
+ make VERSION=$(DEB_VERSION_UPSTREAM) clean
diff --git a/prom-exporter-mosquitto/debian/source/format b/prom-exporter-mosquitto/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/prom-exporter-mosquitto/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/prom-exporter-mosquitto/sha256sums.txt b/prom-exporter-mosquitto/sha256sums.txt
new file mode 100644
index 0000000..1b5ff1e
--- /dev/null
+++ b/prom-exporter-mosquitto/sha256sums.txt
@@ -0,0 +1,2 @@
+0128fe44b9e8175dbb94c948fa74ffff0a566c76064fff2de4d9579631e6446d mosquitto-exporter_0.7.2_linux_amd64.tar.gz
+879ed684823b49846f379ec2eb235c107027148e3727d8e08f60332999eb6808 mosquitto-exporter_0.7.2_linux_arm64.tar.gz