summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-05-10 15:38:44 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-05-10 15:38:44 +0200
commitf442a4ff9babe748b34dc61139428e828f3838fa (patch)
tree4fe63993ab4f2712f92b9a1d5c0773703bc3b9bc
parentingnore arm64 subdirs (diff)
add modbus exporter
-rw-r--r--prom-exporter-modbus/Makefile20
-rw-r--r--prom-exporter-modbus/debian/changelog5
-rw-r--r--prom-exporter-modbus/debian/compat1
-rw-r--r--prom-exporter-modbus/debian/control12
-rw-r--r--prom-exporter-modbus/debian/install1
-rwxr-xr-xprom-exporter-modbus/debian/rules16
-rw-r--r--prom-exporter-modbus/debian/source/format1
-rw-r--r--prom-exporter-modbus/sha256sums.txt3
8 files changed, 59 insertions, 0 deletions
diff --git a/prom-exporter-modbus/Makefile b/prom-exporter-modbus/Makefile
new file mode 100644
index 0000000..cb9d3a4
--- /dev/null
+++ b/prom-exporter-modbus/Makefile
@@ -0,0 +1,20 @@
+VERSION := "invalid"
+GITHUB_BASEURL := "https://github.com/RichiH/modbus_exporter/releases/download"
+
+.PHONY: clean
+
+all: i386/modbus_exporter amd64/modbus_exporter arm64/modbus_exporter
+
+%/modbus_exporter: modbus_exporter-$(VERSION).linux-%.tar.gz
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1
+
+modbus_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 -rf arm64
+ rm -f modbus_exporter-$(VERSION).linux-*.tar.gz
diff --git a/prom-exporter-modbus/debian/changelog b/prom-exporter-modbus/debian/changelog
new file mode 100644
index 0000000..80e7a6d
--- /dev/null
+++ b/prom-exporter-modbus/debian/changelog
@@ -0,0 +1,5 @@
+prom-exporter-modbus (0.4.1-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Wed, 10 May 2023 15:32:17 +0200
diff --git a/prom-exporter-modbus/debian/compat b/prom-exporter-modbus/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/prom-exporter-modbus/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/prom-exporter-modbus/debian/control b/prom-exporter-modbus/debian/control
new file mode 100644
index 0000000..a55e185
--- /dev/null
+++ b/prom-exporter-modbus/debian/control
@@ -0,0 +1,12 @@
+Source: prom-exporter-modbus
+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-modbus
+Architecture: amd64 i386 arm64
+Depends: ${misc:Depends}
+Conflicts: prometheus-modbus-exporter
+Description: prometheus modbus-exporter (binary only)
diff --git a/prom-exporter-modbus/debian/install b/prom-exporter-modbus/debian/install
new file mode 100644
index 0000000..e0725fc
--- /dev/null
+++ b/prom-exporter-modbus/debian/install
@@ -0,0 +1 @@
+usr/bin/prometheus-modbus-exporter
diff --git a/prom-exporter-modbus/debian/rules b/prom-exporter-modbus/debian/rules
new file mode 100755
index 0000000..91d9618
--- /dev/null
+++ b/prom-exporter-modbus/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)/modbus_exporter
+
+override_dh_auto_install:
+ install -d $$(pwd)/debian/tmp/usr/bin/
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/modbus_exporter $$(pwd)/debian/tmp/usr/bin/prometheus-modbus-exporter
+
+override_dh_auto_clean:
+ make VERSION=$(DEB_VERSION_UPSTREAM) clean
diff --git a/prom-exporter-modbus/debian/source/format b/prom-exporter-modbus/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/prom-exporter-modbus/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/prom-exporter-modbus/sha256sums.txt b/prom-exporter-modbus/sha256sums.txt
new file mode 100644
index 0000000..ce55350
--- /dev/null
+++ b/prom-exporter-modbus/sha256sums.txt
@@ -0,0 +1,3 @@
+c15fcf9f035ec5cd3337a5ee336753bd0881790c5ad751543622efd89edd81ec modbus_exporter-0.4.1.linux-i386.tar.gz
+fe799c6873bca839ec5464be7ec01c5ff9292904f5cea7f7dbbfb30b6c3e779e modbus_exporter-0.4.1.linux-amd64.tar.gz
+a5220195e342fb18d5379c1a7df2c20b58aca870a244f462b21e410e9c4e102a modbus_exporter-0.4.1.linux-arm64.tar.gz