From 8b2dbd0814847a1860b7b5b9a410589bc3e6b421 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Fri, 22 May 2020 11:09:38 +0200 Subject: testing/ma1sd: new aport --- testing/ma1sd/APKBUILD | 29 +++++++++++++++++++++++++++++ testing/ma1sd/ma1sd.confd | 7 +++++++ testing/ma1sd/ma1sd.initd | 20 ++++++++++++++++++++ testing/ma1sd/ma1sd.pre-install | 6 ++++++ 4 files changed, 62 insertions(+) create mode 100644 testing/ma1sd/APKBUILD create mode 100644 testing/ma1sd/ma1sd.confd create mode 100644 testing/ma1sd/ma1sd.initd create mode 100644 testing/ma1sd/ma1sd.pre-install 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 +# Maintainer: Bart Ribbers +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 -- cgit v1.2.3