Add net-im/dendrite
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
6
acct-group/dendrite/dendrite-0.ebuild
Normal file
6
acct-group/dendrite/dendrite-0.ebuild
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=-1
|
||||
10
acct-user/dendrite/dendrite-0.ebuild
Normal file
10
acct-user/dendrite/dendrite-0.ebuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit acct-user
|
||||
|
||||
DESCRIPTION="Second-generation Matrix homeserver"
|
||||
ACCT_USER_ID=-1
|
||||
ACCT_USER_GROUPS=( dendrite )
|
||||
|
||||
acct-user_add_deps
|
||||
2
net-im/dendrite/Manifest
Normal file
2
net-im/dendrite/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST dendrite-0.15.2-deps.tar.gz 52968232 BLAKE2B 44daa7e12d929a167c954e6f386c4455e26b59727d495be778e06b64ca064cb47c34bab176255211ac07c78ec393a8182c702cb62a828a0dbf2ac8f2120098ed SHA512 8e997ce1dbd325e863b4d804d3e4e40f882a17eed467300a4ea64429795bd40ad99fcf82a4df326f7067d30d3faacfcc39c82f03d7881cb6432a498caed6c749
|
||||
DIST dendrite-0.15.2.tar.gz 1347612 BLAKE2B 5e9c9c5c8adb8797a6f2e72f8eb7d4b1cb96b1e44b212532927e9221a3479963ec2fa6da6ff03ddc0d8e8d23178742b04154f0171767f3d61fe3456b42c48c8c SHA512 30a9327133af76a4ef06d961931698d55acbd3c175209aa100886794bc06309acb5953ed9e43ada676af0717461fd2fd8c821a04e829302fdcf4f3a7bbffa1cd
|
||||
42
net-im/dendrite/dendrite-0.15.2.ebuild
Normal file
42
net-im/dendrite/dendrite-0.15.2.ebuild
Normal file
@@ -0,0 +1,42 @@
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit go-module optfeature
|
||||
|
||||
DESCRIPTION="Second-generation Matrix homeserver"
|
||||
HOMEPAGE="https://github.com/element-hq/dendrite"
|
||||
SRC_URI="
|
||||
https://mirror.chaotic.ninja/software/${PN}/${P}.tar.gz
|
||||
https://mirror.chaotic.ninja/software/${PN}/${P}-deps.tar.gz
|
||||
"
|
||||
|
||||
# There are several other licenses around for the dependencies
|
||||
# Not mentioning them here, it would get too long
|
||||
LICENSE="AGPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
RDEPEND="
|
||||
acct-user/dendrite
|
||||
acct-group/dendrite
|
||||
"
|
||||
|
||||
src_compile() {
|
||||
ego build -tags goolm -trimpath -v -o bin/ ./cmd/...
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newsbin bin/${PN} "${PN}"
|
||||
newsbin bin/create-account "${PN}-create-account"
|
||||
newsbin bin/generate-config "${PN}-generate-config"
|
||||
newsbin bin/generate-keys "${PN}-generate-keys"
|
||||
newsbin bin/resolve-state "${PN}-resolve-state"
|
||||
newinitd "${FILESDIR}/${PN}.initd-r0" "${PN}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "running a server in production environments" dev-db/postgresql
|
||||
}
|
||||
25
net-im/dendrite/files/dendrite.initd-r0
Normal file
25
net-im/dendrite/files/dendrite.initd-r0
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
|
||||
command="/usr/sbin/${RC_SVCNAME}"
|
||||
command_args="--config /etc/${RC_SVCNAME}.yaml"
|
||||
command_user="${RC_SVCNAME}"
|
||||
command_background="true"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
# PostgreSQL is not listed here due to the SLOT mechanism
|
||||
# used by the package manager.
|
||||
# Latest stable version to date is postgresql-18
|
||||
want caddy nginx
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if ! checkpath --file /etc/${RC_SVCNAME}.yaml -; then
|
||||
eerror "You need a configuration file to proceed"
|
||||
eerror "See /usr/sbin/dendrite-generate-config"
|
||||
fi
|
||||
eend $?
|
||||
}
|
||||
11
net-im/dendrite/metadata.xml
Normal file
11
net-im/dendrite/metadata.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>shinyoukai@laidback.moe</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">element-hq/dendrite</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user