diff --git a/acct-group/dendrite/dendrite-0.ebuild b/acct-group/dendrite/dendrite-0.ebuild new file mode 100644 index 0000000..6d47c62 --- /dev/null +++ b/acct-group/dendrite/dendrite-0.ebuild @@ -0,0 +1,6 @@ +# Copyright 2026 Shin'ya Minazuki +EAPI=8 + +inherit acct-group + +ACCT_GROUP_ID=-1 diff --git a/acct-user/dendrite/dendrite-0.ebuild b/acct-user/dendrite/dendrite-0.ebuild new file mode 100644 index 0000000..e3918da --- /dev/null +++ b/acct-user/dendrite/dendrite-0.ebuild @@ -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 diff --git a/net-im/dendrite/Manifest b/net-im/dendrite/Manifest new file mode 100644 index 0000000..c680768 --- /dev/null +++ b/net-im/dendrite/Manifest @@ -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 diff --git a/net-im/dendrite/dendrite-0.15.2.ebuild b/net-im/dendrite/dendrite-0.15.2.ebuild new file mode 100644 index 0000000..bd28bd4 --- /dev/null +++ b/net-im/dendrite/dendrite-0.15.2.ebuild @@ -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 +} diff --git a/net-im/dendrite/files/dendrite.initd-r0 b/net-im/dendrite/files/dendrite.initd-r0 new file mode 100644 index 0000000..3e3f68f --- /dev/null +++ b/net-im/dendrite/files/dendrite.initd-r0 @@ -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 $? +} diff --git a/net-im/dendrite/metadata.xml b/net-im/dendrite/metadata.xml new file mode 100644 index 0000000..87dcb67 --- /dev/null +++ b/net-im/dendrite/metadata.xml @@ -0,0 +1,11 @@ + + + + + shinyoukai@laidback.moe + Shin'ya Minazuki + + + element-hq/dendrite + +