net-im/dendrite: Initial ebuild

Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
2023-05-09 16:07:04 +02:00
parent 9762e4d3a9
commit 81f014de71
9 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
EAPI="8"
inherit go-module
MY_PV="a49c9f01e227aeb12aa2f27d5bf1915453c23a3b"
DESCRIPTION="Dendrite matrix.org homeserver"
HOMEPAGE="https://github.com/matrix-org/dendrite"
SRC_URI="https://github.com/matrix-org/dendrite/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
https://download.opticaviva.de/distfiles/${P}-deps.tar.xz"
KEYWORDS="amd64"
S="${WORKDIR}/${PN}-${MY_PV}"
SLOT="0"
RDEPEND="
acct-group/dendrite
acct-user/dendrite
"
DEPEND="${RDEPEND}"
src_compile() {
mkdir -p bin || die "Failed to create output directory"
CGO_ENABLED=1 ego build -trimpath -v -o "bin/" ./cmd/...
}
src_install() {
dobin bin/dendrite
newbin bin/generate-keys dendrite-generate-keys
newbin bin/create-account dendrite-create-account
default
newinitd "${FILESDIR}/${PN}.initd" ${PN}
newconfd "${FILESDIR}/${PN}.confd" ${PN}
systemd_dounit "${FILESDIR}/${PN}.service"
diropts -m 0750 -o "${PN}" -g "${PN}"
dodir "/etc/${PN}"
insinto "/etc/${PN}"
doins dendrite-sample.yaml
}