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 @@
EBUILD dendrite-0-r1.ebuild 188 BLAKE2B 4e28128bead6cf68cfcab4939baebf68fcd22d03d5a8168135fda39f47795ba50feb216062895ff1e62cf5bef6fd3d416a1c984ddbd8bd01c3e57b99f2d9de53 SHA512 1bd2432c8bea250cd2b932aeea0e7beddc4a302cf0be165d48332fff4c92c316a9342ddb92bb7415fd16cbc95857a397d4aaefdbe7fda7dd705cf48a1b3bc81b

View File

@@ -0,0 +1,9 @@
# Copyright 2019-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-group
DESCRIPTION="Dendrite program group"
ACCT_GROUP_ID=983

View File

@@ -0,0 +1 @@
EBUILD dendrite-0-r1.ebuild 293 BLAKE2B 37c7ce86b89beb4a9e8a328c1bf4ee85027260fa42c91c3254cd8208670334ed6a13e619a1a626ae8304235c96b3f854ad5cb69ef427fe7aadaeb1dce07e307d SHA512 5f3c4cb0b16c6908365ca0b932ce350cd13df7f4bcabd881cace0298abb16194a69db8f50bdac58a829d4bdc81f08ab8e4cecca27d8425dde2c0b588fa588126

View File

@@ -0,0 +1,13 @@
# Copyright 2019-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
DESCRIPTION="Dendrite program user"
ACCT_USER_ID=983
ACCT_USER_HOME=/var/lib/dendrite
ACCT_USER_HOME_PERMS=0750
ACCT_USER_GROUPS=( dendrite )
acct-user_add_deps

6
net-im/dendrite/Manifest Normal file
View File

@@ -0,0 +1,6 @@
AUX dendrite.confd 0 BLAKE2B 786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce SHA512 cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
AUX dendrite.initd 838 BLAKE2B 3782b011a25a2b52ad60b68bf114c38eaad6e438e877b22d94a4dcb90a57ccab7442c6256cf73205e294249ead47bca6db9846d30ce8ee2b353286228e05e3ac SHA512 c30fff665cbeedd12934c2767d7e0e7256adf80121d06958fe190af049bd73e274a25e04d423fe27ef3f563430a95b0f243450474026173b19eaafef02bfd965
AUX dendrite.service 344 BLAKE2B 506c7145a9902c1bb10d3372f0556b39155adb6751f07cb877560f66323e4c2d2eb2d701d1d44d20c4a65fe818910cbc2fb3ac930debe9487c431a3624aa9803 SHA512 5887907a9f01ba9ecd8b57fa9e0db8930f900368e3487de1455362aa499570e0cecb91d4fddacc86aca56b835e1630b0be3fd874477941a7e637d7f38304f06e
DIST dendrite-0.13.0_pre20230509-deps.tar.xz 551029632 BLAKE2B e9f3028f2388c098df0eea919c82d6f6751e3af4e5aad228d072c1ebe4831058c33341e7abfbbaf9b62dd065876fa6673de952a82f91103247de6810e1326b3f SHA512 5ba5d740178de68fce625b9667f02cd0c0e1c25f6bcc571a04198992d8be181b3241ade308229e4fdd03b1fcc8a2f528cfccaee196271aead99b5fff27462dd9
DIST dendrite-0.13.0_pre20230509.tar.gz 1230362 BLAKE2B aae4d9b9467cf4387f4d53752875d442775ff26b3fe2550c4333a51824fbf0a0d6038a634488c1d90f6c60e8f871b33c4596af4348607aa768630fc91944488b SHA512 0405d4b56792718aaa652547950a9bd0ce19d35c214b42bf86c6609bb01e850f84dcdb5e97000815779b0f8a803454c75bc6bea1a9384aa66a3c441d7be3bfd1
EBUILD dendrite-0.13.0_pre20230509.ebuild 997 BLAKE2B 8d6c39cb66aff02e34437bfdcb4acdbcf6d2420fcd17061b9bfa122ab0cc6cad1cb134aa53f43c568f61b7e0a700704cc513c3693a9e5381cc7471091e517765 SHA512 907168512dcfc0ecdfb3a7e5ddcbaa889c52f6c7c82ee113e11942fd82e560001eb34b33a0076ffd26b23839dd38679cb8270c2af5d21e6f4e38329bd4712d2a

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
}

View File

View File

@@ -0,0 +1,21 @@
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
DENDRITE_USER="${DENDRITE_USER:-dendrite}"
DENDRITE_GROUP="${DENDRITE_GROUP:-dendrite}"
DENDRITE_CONFIG="${DENDRITE_CONFIG:-/etc/dendrite/config.yml}"
DENDRITE_DATA_DIR="${DENDRITE_DATA_DIR:-/var/lib/dendrite}"
DENDRITE_LOG_DIR="${DENDRITE_LOG_DIR:-/var/log/dendrite}"
command="/usr/bin/dendrite"
command_args="--config ${DENDRITE_CONFIG}"
pidfile="/run/${RC_SVCNAME}.pid"
command_background="true"
start_stop_daemon_args="--user=\"${DENDRITE_USER}\" --group=\"${DENDRITE_GROUP}\" --stdout ${DENDRITE_LOG_DIR}/dendrite.log --stderr ${DENDRITE_LOG_DIR}/dendrite.err"
start_pre() {
checkpath -d -o "${DENDRITE_USER}" -m750 "${DENDRITE_DATA_DIR}"
checkpath -d -o "${DENDRITE_USER}" -m750 "${DENDRITE_LOG_DIR}"
}

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Dendrite matrix.org homeserver
After=network.target
[Service]
WorkingDirectory=/var/lib/dendrite
StateDirectory=dendrite
StateDirectoryMode=0750
CacheDirectory=dendrite
CacheDirectoryMode=0750
User=dendrite
Group=dendrite
ExecStart=/usr/bin/dendrite --config /etc/dendrite/config.yml
[Install]
WantedBy=multi-user.target