From c102a213d6b43d57653703093f431ab8bcbb8cea Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 17 Dec 2023 23:33:59 +0100 Subject: add mosuqitto-exporter --- prom-exporter-mosquitto/Makefile | 19 +++++++++++++++++++ prom-exporter-mosquitto/debian/changelog | 5 +++++ prom-exporter-mosquitto/debian/compat | 1 + prom-exporter-mosquitto/debian/control | 12 ++++++++++++ prom-exporter-mosquitto/debian/install | 1 + prom-exporter-mosquitto/debian/rules | 16 ++++++++++++++++ prom-exporter-mosquitto/debian/source/format | 1 + prom-exporter-mosquitto/sha256sums.txt | 2 ++ 8 files changed, 57 insertions(+) create mode 100644 prom-exporter-mosquitto/Makefile create mode 100644 prom-exporter-mosquitto/debian/changelog create mode 100644 prom-exporter-mosquitto/debian/compat create mode 100644 prom-exporter-mosquitto/debian/control create mode 100644 prom-exporter-mosquitto/debian/install create mode 100755 prom-exporter-mosquitto/debian/rules create mode 100644 prom-exporter-mosquitto/debian/source/format create mode 100644 prom-exporter-mosquitto/sha256sums.txt 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 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 +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 -- cgit v1.2.3