43 lines
1019 B
Bash
43 lines
1019 B
Bash
# 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
|
|
}
|