summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-06-22 22:49:02 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-06-22 22:49:02 +0200
commit77436d9f5d34aa0fc475501cdabf5cee4ddc5f2a (patch)
treef3695fa18ff45ead71d49a5904ef464f40217ab6
parentws-fix (diff)
add package for prometheus alertmanager
-rw-r--r--prom-alertmanager/Makefile19
-rw-r--r--prom-alertmanager/debian/changelog5
-rw-r--r--prom-alertmanager/debian/compat1
-rw-r--r--prom-alertmanager/debian/control12
-rw-r--r--prom-alertmanager/debian/prom-alertmanager.install2
-rwxr-xr-xprom-alertmanager/debian/rules13
-rw-r--r--prom-alertmanager/debian/source/format1
-rw-r--r--prom-alertmanager/sha256sums.txt2
8 files changed, 55 insertions, 0 deletions
diff --git a/prom-alertmanager/Makefile b/prom-alertmanager/Makefile
new file mode 100644
index 0000000..b0be89e
--- /dev/null
+++ b/prom-alertmanager/Makefile
@@ -0,0 +1,19 @@
+VERSION := 0.22.2
+GITHUB_BASEURL := "https://github.com/prometheus/alertmanager/releases/download"
+
+.PHONY: clean
+
+all: i386/alertmanager amd64/alertmanager
+
+%/alertmanager: alertmanager-$(VERSION).linux-%.tar.gz
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1
+
+alertmanager-$(VERSION).linux-%.tar.gz:
+ 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 alertmanager-$(VERSION).linux-*.tar.gz
diff --git a/prom-alertmanager/debian/changelog b/prom-alertmanager/debian/changelog
new file mode 100644
index 0000000..3f56c7e
--- /dev/null
+++ b/prom-alertmanager/debian/changelog
@@ -0,0 +1,5 @@
+prom-alertmanager (0.22.2-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Wed, 22 Jun 2021 22:34:37 +0200
diff --git a/prom-alertmanager/debian/compat b/prom-alertmanager/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/prom-alertmanager/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/prom-alertmanager/debian/control b/prom-alertmanager/debian/control
new file mode 100644
index 0000000..b919444
--- /dev/null
+++ b/prom-alertmanager/debian/control
@@ -0,0 +1,12 @@
+Source: prom-alertmanager
+Maintainer: Christian Pointner <equinox@spreadspace.org>
+Section: utils
+Priority: optional
+Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 9), wget, ca-certificates
+
+Package: prom-alertmanager
+Architecture: amd64 i386
+Depends: ${misc:Depends}
+Conflicts: prometheus-alertmanager
+Description: prometheus alertmanager (binaries only)
diff --git a/prom-alertmanager/debian/prom-alertmanager.install b/prom-alertmanager/debian/prom-alertmanager.install
new file mode 100644
index 0000000..4ef0201
--- /dev/null
+++ b/prom-alertmanager/debian/prom-alertmanager.install
@@ -0,0 +1,2 @@
+usr/bin/prometheus-alertmanager
+usr/bin/amtool
diff --git a/prom-alertmanager/debian/rules b/prom-alertmanager/debian/rules
new file mode 100755
index 0000000..6b8773b
--- /dev/null
+++ b/prom-alertmanager/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+%:
+ dh $@
+
+override_dh_auto_configure:
+
+override_dh_auto_build:
+ make $(DEB_BUILD_ARCH)/alertmanager
+
+override_dh_auto_install:
+ install -d $$(pwd)/debian/tmp/usr/bin/
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/alertmanager $$(pwd)/debian/tmp/usr/bin/prometheus-alertmanager
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/amtool $$(pwd)/debian/tmp/usr/bin/amtool
diff --git a/prom-alertmanager/debian/source/format b/prom-alertmanager/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/prom-alertmanager/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/prom-alertmanager/sha256sums.txt b/prom-alertmanager/sha256sums.txt
new file mode 100644
index 0000000..25e7827
--- /dev/null
+++ b/prom-alertmanager/sha256sums.txt
@@ -0,0 +1,2 @@
+d4248d2bb47bbd891de9f092f129a65246ef4cb32538c97824b9fec34b867d40 alertmanager-0.22.2.linux-i386.tar.gz
+9c3b1cce9c74f5cecb07ec4a636111ca52696c0a088dbaecf338594d6e55cd1a alertmanager-0.22.2.linux-amd64.tar.gz