summaryrefslogtreecommitdiffstats
path: root/net-im/dendrite
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-03-12 20:48:29 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2024-03-12 20:48:29 +0100
commita4c48186950ff6fc2fc90800d14eede98e8789a7 (patch)
tree9f0c10e4dfa0190040393c1ea5c6b05f7f0bcfc6 /net-im/dendrite
parentsearc-0.0.27 (diff)
downloadg-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar.gz
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar.bz2
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar.lz
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar.xz
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.tar.zst
g-a4c48186950ff6fc2fc90800d14eede98e8789a7.zip
Diffstat (limited to 'net-im/dendrite')
-rw-r--r--net-im/dendrite/Manifest2
-rw-r--r--net-im/dendrite/dendrite-0.13.6.ebuild42
-rw-r--r--net-im/dendrite/files/dendrite-monolith.confd3
-rw-r--r--net-im/dendrite/files/dendrite-monolith.initd28
-rw-r--r--net-im/dendrite/files/dendrite-monolith.service17
-rw-r--r--net-im/dendrite/files/dendrite.confd5
-rw-r--r--net-im/dendrite/files/dendrite.initd27
-rw-r--r--net-im/dendrite/files/dendrite.service17
-rw-r--r--net-im/dendrite/metadata.xml12
9 files changed, 153 insertions, 0 deletions
diff --git a/net-im/dendrite/Manifest b/net-im/dendrite/Manifest
new file mode 100644
index 0000000..0e4c9b9
--- /dev/null
+++ b/net-im/dendrite/Manifest
@@ -0,0 +1,2 @@
+DIST dendrite-0.13.6-vendor.tar.gz 38675509 BLAKE2B ba4b1c438870948a15b3ef544986cafa42ee26ce8a3b9b293650cb4217e6a8748caefa361a54bec32a0a35025c65f8eb5afbcabe39f7a45530e26eeb4da5404e SHA512 75ed0000f59257ba68d4ad111fa3876742f8dec3728e3d8a5c45a42ffac1203c19bdd54b370df013f572e937483c8f177f9086a8dbd7213ea9b9d6b57107c715
+DIST dendrite-0.13.6.tar.gz 1311877 BLAKE2B b833a045b22529ce0941612cf49c1e2955c7821d0b42346c4eb542eb0931ba667720f393f8677f4eda468e111d4907d3cc074a69bee7ecff0551454414104b22 SHA512 96294309e091382a2d96e508caab447c7e0d0366719beca14da6db56b27e098cfa5939e532f7d9ee69b12ff7745add9a642bec411bb8c6ce0dd521f033e23ec9
diff --git a/net-im/dendrite/dendrite-0.13.6.ebuild b/net-im/dendrite/dendrite-0.13.6.ebuild
new file mode 100644
index 0000000..8f9438c
--- /dev/null
+++ b/net-im/dendrite/dendrite-0.13.6.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go systemd
+
+DESCRIPTION="Dendrite is a second-generation Matrix homeserver written in Go!"
+HOMEPAGE="https://github.com/matrix-org/dendrite"
+
+SRC_URI="https://github.com/matrix-org/dendrite/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/bekcpear/gopkg-vendors/archive/refs/tags/vendor-${P}.tar.gz -> ${P}-vendor.tar.gz"
+
+LICENSE="Apache-2.0 BSD-2 BSD ISC LGPL-3 MIT MPL-2.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+BDEPEND="
+ >dev-lang/go-1.19.9999:=
+"
+RDEPEND="
+ acct-user/dendrite
+ acct-group/dendrite
+"
+RESTRICT="strip"
+
+src_install() {
+ go_src_install
+
+ insinto /etc/dendrite
+ doins dendrite-sample.yaml
+
+ keepdir /var/log/dendrite
+ fowners dendrite:dendrite /var/log/dendrite
+ fperms 750 /var/log/dendrite
+
+ dodoc -r docs/*
+
+ newinitd "${FILESDIR}/dendrite.initd" dendrite
+ newconfd "${FILESDIR}/dendrite.confd" dendrite
+ systemd_dounit "${FILESDIR}"/dendrite.service
+}
diff --git a/net-im/dendrite/files/dendrite-monolith.confd b/net-im/dendrite/files/dendrite-monolith.confd
new file mode 100644
index 0000000..8c09541
--- /dev/null
+++ b/net-im/dendrite/files/dendrite-monolith.confd
@@ -0,0 +1,3 @@
+# extra arguments for dendrite monolith
+
+EXTRA_ARGS=""
diff --git a/net-im/dendrite/files/dendrite-monolith.initd b/net-im/dendrite/files/dendrite-monolith.initd
new file mode 100644
index 0000000..52dba9e
--- /dev/null
+++ b/net-im/dendrite/files/dendrite-monolith.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="dendrite-monolith daemon"
+description="Dendrite (Matrix Homeserver)"
+command=/usr/bin/dendrite-monolith-server
+command_args="--config /etc/dendrite/dendrite.monolith.yaml ${EXTRA_ARGS}"
+pidfile="/run/dendrite-monolith.pid"
+command_background="yes"
+command_user="dendrite:dendrite"
+directory="/var/lib/dendrite"
+output_log="/var/log/dendrite/dendrite.log"
+error_log="/var/log/dendrite/dendrite.log"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ _pem="/var/lib/dendrite/matrix_key.pem"
+ if [[ ! -e "${_pem}" ]]; then
+ /usr/bin/generate-keys --private-key "${_pem}"
+ chown dendrite:dendrite "${_pem}"
+ chmod 600 "${_pem}"
+ fi
+ ulimit -n 65535
+}
diff --git a/net-im/dendrite/files/dendrite-monolith.service b/net-im/dendrite/files/dendrite-monolith.service
new file mode 100644
index 0000000..55c1d6f
--- /dev/null
+++ b/net-im/dendrite/files/dendrite-monolith.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Dendrite (Matrix Homeserver)
+After=syslog.target
+After=network.target
+
+[Service]
+RestartSec=2s
+Type=simple
+User=dendrite
+Group=dendrite
+WorkingDirectory=/var/lib/dendrite/
+ExecStart=/usr/bin/dendrite-monolith-server
+Restart=always
+LimitNOFILE=65535
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/dendrite/files/dendrite.confd b/net-im/dendrite/files/dendrite.confd
new file mode 100644
index 0000000..0c4a069
--- /dev/null
+++ b/net-im/dendrite/files/dendrite.confd
@@ -0,0 +1,5 @@
+# extra arguments for dendrite
+
+EXTRA_ARGS=""
+
+rc_ulimit="-n 65535"
diff --git a/net-im/dendrite/files/dendrite.initd b/net-im/dendrite/files/dendrite.initd
new file mode 100644
index 0000000..ee210a2
--- /dev/null
+++ b/net-im/dendrite/files/dendrite.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="dendrite daemon"
+description="Dendrite (Matrix Homeserver)"
+command=/usr/bin/dendrite
+command_args="--config /etc/dendrite/dendrite.yaml ${EXTRA_ARGS}"
+pidfile="/run/dendrite.pid"
+command_background="yes"
+command_user="dendrite:dendrite"
+directory="/var/lib/dendrite"
+output_log="/var/log/dendrite/dendrite.log"
+error_log="/var/log/dendrite/dendrite.log"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ _pem="/var/lib/dendrite/matrix_key.pem"
+ if [ ! -e "${_pem}" ]; then
+ /usr/bin/generate-keys --private-key "${_pem}"
+ chown dendrite:dendrite "${_pem}"
+ chmod 600 "${_pem}"
+ fi
+}
diff --git a/net-im/dendrite/files/dendrite.service b/net-im/dendrite/files/dendrite.service
new file mode 100644
index 0000000..0b7a1da
--- /dev/null
+++ b/net-im/dendrite/files/dendrite.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Dendrite (Matrix Homeserver)
+After=syslog.target
+After=network.target
+
+[Service]
+RestartSec=2s
+Type=simple
+User=dendrite
+Group=dendrite
+WorkingDirectory=/var/lib/dendrite/
+ExecStart=/usr/bin/dendrite
+Restart=always
+LimitNOFILE=65535
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/dendrite/metadata.xml b/net-im/dendrite/metadata.xml
new file mode 100644
index 0000000..9bd4781
--- /dev/null
+++ b/net-im/dendrite/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>a@sijanec.eu</email>
+ <name>Anton Luka Šijanec</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">matrix-org/dendrite</remote-id>
+ <bugs-to>https://github.com/matrix-org/dendrite/issues</bugs-to>
+ </upstream>
+</pkgmetadata>