net-im/mautrix-discord: add 0.5.0

Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
Julien Roy
2023-06-16 09:46:20 -04:00
parent b253e0bc0f
commit 120c6651cd
2 changed files with 65 additions and 0 deletions

View File

@@ -2,3 +2,5 @@ DIST mautrix-discord-0.3.0.gh.tar.gz 102756 BLAKE2B 20e239b45087a3daa75c3ee1420d
DIST mautrix-discord-0.3.0.tar.xz 63734228 BLAKE2B 6e7eb00fa3802d4142e66637c3a11f233e3981be6799009c12351c421df4e1a3129a014afd0bbc1b39f006d110c4706c19599ab5a8e0bddfbefc659bfee285b5 SHA512 2dceaf0798e6efbd3d30506b55c2fc4232148950b1505003b9c5827a78cb6ee4b000ba5715ea4801dffbf9d469e4573b46e8f5825646290c3774fadeac0dacc8
DIST mautrix-discord-0.4.0.gh.tar.gz 109060 BLAKE2B 3232e639824845386491a323b06fbe4c4ff8ae80d22bce77b8c68adf17339cb2f1819e54a8a36e2dd896aa6b373d4cf756af2515b555ed33f19503e16e634964 SHA512 0e3ab86414e7b43ca399bffadfd3f8840baff98e296a9e399eacb0ba63b3a5f149c3cc6efbc6a064281921734d8d490d10fd4d85ce90f80a6d7a3ead06bdae6e
DIST mautrix-discord-0.4.0.tar.xz 61069068 BLAKE2B ad2b14937d30e20d003887c15cae0b6b6ee547ed3220a5f442bf2b20346b66cb0b622010f1a0cf645844524a980146bb713b376889af78133e490ecac8933dcf SHA512 53336a492abff8472f5a0a5987831c93f09045a50dc06a74ec53e7a3f2fe7359d08c811c4f93cdf718f24b2c7fb5f90f807405efcc68b287dc7d7f51ce0e8e10
DIST mautrix-discord-0.5.0.gh.tar.gz 111287 BLAKE2B f184f1fb978bb63b1e1136160ac483237b6caa317be31718c33f54c88cbc9f77a5112c5cdb779f27e9f4f544f15a7d319cfd69ebd07c36c4d0e0582956c50468 SHA512 f471077818efaeac178eb11383aadf488aaea575aad2bac55fbfd866363c91ff2f8c47ae9317dbb7f89a1a44302e6aff54a1d2487872fec15bc077581ee92f24
DIST mautrix-discord-0.5.0.tar.xz 61305864 BLAKE2B 2bf0d892c2e241a2bdf2bdc0431d1676daa56390097df75636a829899ea8c83520d6bbee281bb40ea588f3a99c68b811949c8a0e69e44204acfca5341674beea SHA512 8012831832b89b83ff82e74b7010b91ba304aa3158e026cc512b38874b62c81e0f04be1fd1d0d5e549e7e70bf6d27064d3e4b48714a0a06e8de7b1f20e5f1451

View File

@@ -0,0 +1,63 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="A Matrix-Discord puppeting bridge"
HOMEPAGE="https://github.com/mautrix/discord"
SRC_URI="https://github.com/mautrix/discord/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
https://jroy.ca/dist/${P}.tar.xz
"
S="${WORKDIR}/discord-${PV}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/${PN}
dev-libs/olm
"
DEPEND="${RDEPEND}"
src_compile() {
ego build
}
src_install() {
dobin mautrix-discord
keepdir /var/log/mautrix/discord
fowners -R root:mautrix /var/log/mautrix
fperms -R 770 /var/log/mautrix
sed -i -e "s/\.\/logs/\/var\/log\/${PN/-/\\\/}/" "example-config.yaml" || die
insinto "/etc/mautrix"
newins "example-config.yaml" "${PN/-/_}.yaml"
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
fowners -R root:mautrix /etc/mautrix
fperms -R 770 /etc/mautrix
}
pkg_postinst() {
einfo
elog ""
elog "Before you can use ${PN}, you must configure it correctly"
elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\""
elog "When done, run the following command: emerge --config ${CATEGORY}/${PN}"
elog "Then, you must register the bridge with your homeserver"
elog "Refer your homeserver's documentation for instructions"
elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml"
elog "Finally, you may start the ${PN} daemon"
einfo
}
pkg_config() {
su - "${PN}" -s /bin/sh -c \
"/usr/bin/${PN} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
}