blob: 3cdaa1ad14cb436b9b4ac159a917a4a56474b798 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module unpacker git-r3
EGIT_REPO_URI="https://github.com/matrix-org/dendrite.git"
KEYWORDS=""
DESCRIPTION="Dendrite is a second-generation Matrix homeserver written in Go!"
HOMEPAGE="https://github.com/matrix-org/dendrite"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=""
RDEPEND="acct-user/dendrite ${DEPEND}"
BDEPEND=">=dev-lang/go-1.18.0"
src_unpack() {
if [[ ${PV} == *9999 ]]; then
git-r3_src_unpack
go-module_live_vendor
else
unpacker_src_unpack
go-module_src_unpack
fi
}
src_compile() {
# bug 906073
use elibc_musl && export CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
GOBIN="${S}/bin" go install -trimpath -v "${S}/./cmd/..." || die
}
src_install() {
# Put SQLite databases in /var/lib/dendrite
sed -i 's"connection_string: file:"connection_string: file:/var/lib/dendrite/"' dendrite-sample.yaml || die
dobin "${S}/bin/"*
insinto /etc/dendrite
newins dendrite-sample.yaml dendrite.yaml
newconfd "${FILESDIR}/dendrite.conf" dendrite
newinitd "${FILESDIR}/dendrite.init" dendrite
keepdir /var/log/dendrite
fowners dendrite:dendrite /var/log/dendrite
}
|