Files
gentoo-overlay/net-im/dendrite/dendrite-0.13.0_pre20230509.ebuild

46 lines
1.0 KiB
Bash

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}"
keepdir "/var/lib/${PN}"
keepdir "/var/log/${PN}"
dodir "/etc/${PN}"
insinto "/etc/${PN}"
doins dendrite-sample.yaml
}