summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-09-24 15:20:58 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-09-24 15:20:58 +0200
commit9ec47c90c8507bbe4542cc5ed211bd539ffb7279 (patch)
tree8646c0dc02bfbfe5b96c052ed422f7cdd623cdb9
parentfix pacakge clean targets (diff)
add package for ipmi_exporter
-rw-r--r--prom-exporter-ipmi/Makefile18
-rw-r--r--prom-exporter-ipmi/debian/changelog5
-rw-r--r--prom-exporter-ipmi/debian/compat1
-rw-r--r--prom-exporter-ipmi/debian/control12
-rw-r--r--prom-exporter-ipmi/debian/install1
-rwxr-xr-xprom-exporter-ipmi/debian/rules16
-rw-r--r--prom-exporter-ipmi/debian/source/format1
-rw-r--r--prom-exporter-ipmi/sha256sums.txt1
8 files changed, 55 insertions, 0 deletions
diff --git a/prom-exporter-ipmi/Makefile b/prom-exporter-ipmi/Makefile
new file mode 100644
index 0000000..2e8dd5b
--- /dev/null
+++ b/prom-exporter-ipmi/Makefile
@@ -0,0 +1,18 @@
+VERSION := "invalid"
+GITHUB_BASEURL := "https://github.com/prometheus-community/ipmi_exporter/releases/download"
+
+.PHONY: clean
+
+all: amd64/ipmi_exporter
+
+%/ipmi_exporter: ipmi_exporter-$(VERSION).linux-%.tar.gz
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1
+
+ipmi_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 amd64
+ rm -f ipmi_exporter-$(VERSION).linux-*.tar.gz
diff --git a/prom-exporter-ipmi/debian/changelog b/prom-exporter-ipmi/debian/changelog
new file mode 100644
index 0000000..2101e25
--- /dev/null
+++ b/prom-exporter-ipmi/debian/changelog
@@ -0,0 +1,5 @@
+prom-exporter-ipmi (1.4.0-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Wed, 24 Sep 2021 15:17:42 +0200
diff --git a/prom-exporter-ipmi/debian/compat b/prom-exporter-ipmi/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/prom-exporter-ipmi/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/prom-exporter-ipmi/debian/control b/prom-exporter-ipmi/debian/control
new file mode 100644
index 0000000..71cf99c
--- /dev/null
+++ b/prom-exporter-ipmi/debian/control
@@ -0,0 +1,12 @@
+Source: prom-exporter-ipmi
+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-ipmi
+Architecture: amd64 i386
+Depends: ${misc:Depends}, freeipmi-tools
+Conflicts: prometheus-ipmi-exporter
+Description: prometheus ipmi-exporter (binary only)
diff --git a/prom-exporter-ipmi/debian/install b/prom-exporter-ipmi/debian/install
new file mode 100644
index 0000000..3dbe59e
--- /dev/null
+++ b/prom-exporter-ipmi/debian/install
@@ -0,0 +1 @@
+usr/bin/prometheus-ipmi-exporter
diff --git a/prom-exporter-ipmi/debian/rules b/prom-exporter-ipmi/debian/rules
new file mode 100755
index 0000000..0112872
--- /dev/null
+++ b/prom-exporter-ipmi/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)/ipmi_exporter
+
+override_dh_auto_install:
+ install -d $$(pwd)/debian/tmp/usr/bin/
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/ipmi_exporter $$(pwd)/debian/tmp/usr/bin/prometheus-ipmi-exporter
+
+override_dh_auto_clean:
+ make VERSION=$(DEB_VERSION_UPSTREAM) clean
diff --git a/prom-exporter-ipmi/debian/source/format b/prom-exporter-ipmi/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/prom-exporter-ipmi/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/prom-exporter-ipmi/sha256sums.txt b/prom-exporter-ipmi/sha256sums.txt
new file mode 100644
index 0000000..9e7c8b6
--- /dev/null
+++ b/prom-exporter-ipmi/sha256sums.txt
@@ -0,0 +1 @@
+e052c05ac7d4a2a653d082fd01c3d5e782af72087baecf8d38538d16a86fe111 /tmp/ipmi_exporter-1.4.0.linux-amd64.tar.gz