From 5fc6214c59c5cd3a1a62838fe9865f0c2c0a2aed Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 27 Jul 2021 21:01:32 +0200 Subject: add package for NUT exporter --- prom-exporter-nut/Makefile | 19 +++++++++++++++++++ prom-exporter-nut/debian/changelog | 5 +++++ prom-exporter-nut/debian/compat | 1 + prom-exporter-nut/debian/control | 12 ++++++++++++ prom-exporter-nut/debian/prom-exporter-nut.install | 1 + prom-exporter-nut/debian/rules | 12 ++++++++++++ prom-exporter-nut/debian/source/format | 1 + prom-exporter-nut/sha256sums.txt | 2 ++ 8 files changed, 53 insertions(+) create mode 100644 prom-exporter-nut/Makefile create mode 100644 prom-exporter-nut/debian/changelog create mode 100644 prom-exporter-nut/debian/compat create mode 100644 prom-exporter-nut/debian/control create mode 100644 prom-exporter-nut/debian/prom-exporter-nut.install create mode 100755 prom-exporter-nut/debian/rules create mode 100644 prom-exporter-nut/debian/source/format create mode 100644 prom-exporter-nut/sha256sums.txt diff --git a/prom-exporter-nut/Makefile b/prom-exporter-nut/Makefile new file mode 100644 index 0000000..ea0ffa0 --- /dev/null +++ b/prom-exporter-nut/Makefile @@ -0,0 +1,19 @@ +VERSION := 2.2.1 +GITHUB_BASEURL := "https://github.com/DRuggeri/nut_exporter/releases/download" + +.PHONY: clean + +all: i386/nut_exporter amd64/nut_exporter + +%/nut_exporter: nut_exporter-v$(VERSION)-linux-% + mkdir -p $(shell echo $@ | sed 's#/.*##') + cp $< $@ + +nut_exporter-v$(VERSION)-linux-%: + wget -nc "$(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 nut_exporter-v$(VERSION).linux-* diff --git a/prom-exporter-nut/debian/changelog b/prom-exporter-nut/debian/changelog new file mode 100644 index 0000000..7e91a6b --- /dev/null +++ b/prom-exporter-nut/debian/changelog @@ -0,0 +1,5 @@ +prom-exporter-nut (2.2.1-1) unstable; urgency=medium + + * Initial release. + + -- Christian Pointner Wed, 27 Jul 2021 20:58:05 +0200 diff --git a/prom-exporter-nut/debian/compat b/prom-exporter-nut/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/prom-exporter-nut/debian/compat @@ -0,0 +1 @@ +9 diff --git a/prom-exporter-nut/debian/control b/prom-exporter-nut/debian/control new file mode 100644 index 0000000..7863f22 --- /dev/null +++ b/prom-exporter-nut/debian/control @@ -0,0 +1,12 @@ +Source: prom-exporter-nut +Maintainer: Christian Pointner +Section: utils +Priority: optional +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9), wget, ca-certificates + +Package: prom-exporter-nut +Architecture: amd64 i386 +Depends: ${misc:Depends} +Conflicts: prometheus-nut-exporter +Description: prometheus nut-exporter (binary only) diff --git a/prom-exporter-nut/debian/prom-exporter-nut.install b/prom-exporter-nut/debian/prom-exporter-nut.install new file mode 100644 index 0000000..2db7870 --- /dev/null +++ b/prom-exporter-nut/debian/prom-exporter-nut.install @@ -0,0 +1 @@ +usr/bin/prometheus-nut-exporter diff --git a/prom-exporter-nut/debian/rules b/prom-exporter-nut/debian/rules new file mode 100755 index 0000000..d55c18f --- /dev/null +++ b/prom-exporter-nut/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_configure: + +override_dh_auto_build: + make $(DEB_BUILD_ARCH)/nut_exporter + +override_dh_auto_install: + install -d $$(pwd)/debian/tmp/usr/bin/ + install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/nut_exporter $$(pwd)/debian/tmp/usr/bin/prometheus-nut-exporter diff --git a/prom-exporter-nut/debian/source/format b/prom-exporter-nut/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/prom-exporter-nut/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/prom-exporter-nut/sha256sums.txt b/prom-exporter-nut/sha256sums.txt new file mode 100644 index 0000000..6e6d85f --- /dev/null +++ b/prom-exporter-nut/sha256sums.txt @@ -0,0 +1,2 @@ +041aa5ad4e0b100e61fed0c162263a6756a6f6ac0095bbbbbe5675c98c7ad259 nut_exporter-v2.2.1-linux-amd64 +0cac239fa8aac334e7b83882a2ad688816e6814d0e0bfc8cc63e69ff87c96ad6 nut_exporter-v2.2.1-linux-i386 -- cgit v1.2.3