aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-05-22 11:09:38 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-05-22 18:47:03 +0000
commit8b2dbd0814847a1860b7b5b9a410589bc3e6b421 (patch)
treebdb4e61c07d0e3f10597e1b9f9168f8abefcc80a
parentb7311c5c5df04bd80b202b44d1144979a35ee57e (diff)
testing/ma1sd: new aport
-rw-r--r--testing/ma1sd/APKBUILD29
-rw-r--r--testing/ma1sd/ma1sd.confd7
-rw-r--r--testing/ma1sd/ma1sd.initd20
-rw-r--r--testing/ma1sd/ma1sd.pre-install6
4 files changed, 62 insertions, 0 deletions
diff --git a/testing/ma1sd/APKBUILD b/testing/ma1sd/APKBUILD
new file mode 100644
index 00000000000..71f6257e4b6
--- /dev/null
+++ b/testing/ma1sd/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgname=ma1sd
+pkgver=2.3.0
+pkgrel=0
+pkgdesc="Federated Matrix Identity Server"
+url="https://github.com/ma1uta/ma1sd/"
+arch="noarch"
+license="AGPL-3.0-or-later"
+install="$pkgname.pre-install"
+depends="openjdk8-jre"
+subpackages="$pkgname-openrc"
+source="$pkgname-$pkgver.tar::https://github.com/ma1uta/ma1sd/releases/download/$pkgver/ma1sd-shadow.tar
+ ma1sd.initd
+ ma1sd.confd
+ "
+options="!check" # No tests in pre-compiled package
+builddir="$srcdir/ma1sd-shadow"
+
+package() {
+ install -Dm755 bin/ma1sd "$pkgdir"/usr/bin/ma1sd
+ install -Dm644 lib/ma1sd.jar "$pkgdir"/usr/lib/ma1sd.jar
+ install -Dm755 "$srcdir"/ma1sd.initd "$pkgdir"/etc/init.d/ma1sd
+ install -Dm644 "$srcdir"/ma1sd.confd "$pkgdir"/etc/conf.d/ma1sd
+}
+
+sha512sums="afa56c788c0ca6d4b144f20330f1e347c3f476bab8b49c4a3b1bd5892d63eaa52bff8b1d9fc0b7f609815f77e70164550c1f2b89df4c6576aefe4531b131c649 ma1sd-2.3.0.tar
+4225641b2c7dcaa18ee5ee9a544c4299c6cb11b263da007e101f44394d90aeea86e98b273526bdf121f370d4cf60290d72a9364f953ced0ec9d5deb4da96bd13 ma1sd.initd
+7c3cef61c4d414903ea68de83127c21503875a39a5b4408747862479e8107bf3e6f454af0f1d096d5f69f3524fca9d3802e812d9e81576c271e109e048473bd5 ma1sd.confd"
diff --git a/testing/ma1sd/ma1sd.confd b/testing/ma1sd/ma1sd.confd
new file mode 100644
index 00000000000..8fc2213b6f1
--- /dev/null
+++ b/testing/ma1sd/ma1sd.confd
@@ -0,0 +1,7 @@
+# Configuration for /etc/init.d/ma1sd
+
+# Location of configuration file
+config="/etc/ma1sd/ma1sd.yaml"
+
+# Extra arguments to be passed when starting ma1sd
+# command_args=""
diff --git a/testing/ma1sd/ma1sd.initd b/testing/ma1sd/ma1sd.initd
new file mode 100644
index 00000000000..a815c0f1b30
--- /dev/null
+++ b/testing/ma1sd/ma1sd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="ma1sd"
+description="Daemon for ma1sd, the federated Matrix identity server"
+
+: ${command_user:="ma1sd:ma1sd"}
+: ${config:="/etc/ma1sd/ma1sd.yaml"}
+
+command="/usr/bin/ma1sd"
+command_args="-c $config $command_args"
+
+depends() {
+ need net
+}
+
+start_pre() {
+ # /var/lib/ma1sd needs to be owned by the ma1sd user
+ checkpath --directory --owner "$command_user" /var/lib/ma1sd
+}
diff --git a/testing/ma1sd/ma1sd.pre-install b/testing/ma1sd/ma1sd.pre-install
new file mode 100644
index 00000000000..4d4bf62330e
--- /dev/null
+++ b/testing/ma1sd/ma1sd.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S ma1sd 2>/dev/null
+adduser -S -D -H -h /var/lib/ma1sd -s /sbin/nologin -G ma1sd -g ma1sd ma1sd 2>/dev/null
+
+exit 0