net-im/mautrix-discord: add 0.3.0

Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
Julien Roy
2023-04-16 16:38:26 -04:00
parent 3467a8d30f
commit 989f0663fe
2 changed files with 65 additions and 0 deletions

View File

@@ -2,3 +2,5 @@ DIST mautrix-discord-0.1.1.gh.tar.gz 89981 BLAKE2B 93f150fba626df95a3441fcd13c6a
DIST mautrix-discord-0.1.1.tar.xz 60147380 BLAKE2B 6ef91980117fd3d46f3eb9a082bc546b913455d0a9f985417fa8bd39e15a7ace349552d34febd13faabcccc707799e3eec9b8c16d0a37b2af67b9d92d6e76462 SHA512 6adc2e630f3dd5680dc0d086c3132d5046de0809c5bb7788a3a5788ebd9d0d7a0771e37b6e3dfa97a9584af562934ece66ea8ccd6504ba71d185b6cb87bdf9d1
DIST mautrix-discord-0.2.0.gh.tar.gz 98258 BLAKE2B aef1e128bc35179dcf1246580d079bae703ee6c641ba7d8568b9425fda244b8f39bef984e4430ab7bbfa951a7a157195340daa5fe97cd04e12f17f33ad16bc0b SHA512 b3e730e28d30b884050465bcc71bdbfaede2a964b1d5973c2575c8f2dc2fdb318a5a93e8b28fc174746ddff63e7c5c09a88eccd755934286989faba9bd41a45d
DIST mautrix-discord-0.2.0.tar.xz 60477896 BLAKE2B cb3c9841d588cb68616e50bc95f5c1485b3165e547b7ec8d7a0424a4b422b61709f6e16e6fc79d8b5180f2f021c8001f586c31d06fb3895ef53230234834184f SHA512 77337d745242bc7fc91c9f3aacff69e2d2bd58baf1f8468795fbe025d807959bda4c02e97c64f3cc4a4d5421a47e01743b492ae32434b6c42c36fc1c9b2ab9ce
DIST mautrix-discord-0.3.0.gh.tar.gz 102756 BLAKE2B 20e239b45087a3daa75c3ee1420df348a861d79595c86490c404e42ce6382b5be876e4ba215f9ceaa6b756d73741f05e6ed0ce8af9c43014a8dc6676251bece6 SHA512 5a5033f505f78977d078ed66a4cfab6141b3aaa4a3f16f64463f89508ec717162018d4a5cc1b4b207529e8b06bb70f8a26a77001830551b69c7bd587e8f759ca
DIST mautrix-discord-0.3.0.tar.xz 63734228 BLAKE2B 6e7eb00fa3802d4142e66637c3a11f233e3981be6799009c12351c421df4e1a3129a014afd0bbc1b39f006d110c4706c19599ab5a8e0bddfbefc659bfee285b5 SHA512 2dceaf0798e6efbd3d30506b55c2fc4232148950b1505003b9c5827a78cb6ee4b000ba5715ea4801dffbf9d469e4573b46e8f5825646290c3774fadeac0dacc8

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"
}