summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoshless2020-12-01 23:41:38 +0100
committerRoshless2020-12-01 23:41:38 +0100
commit49e0252fc4c0280349b40120707ceccf5bbfb68d (patch)
tree8a656bab1d8cf9b07dc57eb3d5968281cef77245
downloadaur-49e0252fc4c0280349b40120707ceccf5bbfb68d.tar.gz
Initial upload: pushgateway 1.3.0-1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD48
-rw-r--r--pushgateway.service9
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..95e21d4e249
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = pushgateway
+ pkgdesc = Prometheus push acceptor for ephemeral and batch jobs.
+ pkgver = 1.3.0
+ pkgrel = 1
+ url = https://github.com/prometheus/pushgateway
+ arch = any
+ license = Apache
+ makedepends = go
+ makedepends = git
+ depends = glibc
+ source = https://github.com/prometheus/pushgateway/archive/v1.3.0.tar.gz
+ source = pushgateway.service
+ sha512sums = c87442142b54c916d86eea451717cfaf64fba79f1f1103ab38c307267981cefe3ec5299a0c7bc68f40817e3c9f0df67af32adc642b04b55760aa54c3cf092cc8
+ sha512sums = 94c46a5969529d48b0a4f7b0e673d8d393dd2692d1c97d725aa0c9d90c4157969cca8d379591d4bbe5b454d2ecb26750193f0eeb9e221dcdc5619d4dfffbf147
+
+pkgname = pushgateway
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0028fbc9d22
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Roshless <pkg@roshless.me>
+# Contributor: Jelle van der Waa <jelle@dwaa.nl>
+
+pkgname=pushgateway
+pkgver=1.3.0
+pkgrel=1
+pkgdesc="Prometheus push acceptor for ephemeral and batch jobs."
+arch=('any')
+url="https://github.com/prometheus/pushgateway"
+license=('Apache')
+depends=('glibc')
+makedepends=('go' 'git')
+source=("https://github.com/prometheus/pushgateway/archive/v${pkgver}.tar.gz"
+ "pushgateway.service")
+
+build() {
+ cd $pkgname-$pkgver
+
+ LDFLAGS="-extldflags $LDFLAGS \
+ -X github.com/prometheus/common/version.Version=$pkgver \
+ -X github.com/prometheus/common/version.Revision=$pkgver \
+ -X github.com/prometheus/common/version.Branch=tarball \
+ -X github.com/prometheus/common/version.BuildUser=someone@builder \
+ -X github.com/prometheus/common/version.BuildDate=$(date -d@"$SOURCE_DATE_EPOCH" +%Y%m%d-%H:%M:%S)"
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external $LDFLAGS" \
+ .
+}
+
+check() {
+ cd $pkgname-$pkgver
+ go test ./...
+}
+
+package() {
+ install -Dm644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
+ cd $pkgname-$pkgver
+ install -Dm755 $pkgname -t "$pkgdir/usr/bin/"
+}
+
+
+sha512sums=('c87442142b54c916d86eea451717cfaf64fba79f1f1103ab38c307267981cefe3ec5299a0c7bc68f40817e3c9f0df67af32adc642b04b55760aa54c3cf092cc8'
+ '94c46a5969529d48b0a4f7b0e673d8d393dd2692d1c97d725aa0c9d90c4157969cca8d379591d4bbe5b454d2ecb26750193f0eeb9e221dcdc5619d4dfffbf147')
diff --git a/pushgateway.service b/pushgateway.service
new file mode 100644
index 00000000000..f5fe8b165d6
--- /dev/null
+++ b/pushgateway.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Prometheus Pushgateway
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/prometheus-pushgateway
+
+[Install]
+WantedBy=multi-user.target