commit: 428e95ffd91460c59bb0aed5a838fec3604dc7d2 Author: Julien Roy <julien <AT> jroy <DOT> ca> AuthorDate: Sat Sep 16 22:24:04 2023 +0000 Commit: Julien Roy <julien <AT> jroy <DOT> ca> CommitDate: Sat Sep 16 22:24:40 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=428e95ff
net-im/mautrix-discord: add 0.6.2 Signed-off-by: Julien Roy <julien <AT> jroy.ca> net-im/mautrix-discord/Manifest | 2 + .../mautrix-discord/mautrix-discord-0.6.2.ebuild | 65 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/net-im/mautrix-discord/Manifest b/net-im/mautrix-discord/Manifest index 3ba0ba6efb..08054eb91c 100644 --- a/net-im/mautrix-discord/Manifest +++ b/net-im/mautrix-discord/Manifest @@ -2,3 +2,5 @@ DIST mautrix-discord-0.4.0.gh.tar.gz 109060 BLAKE2B 3232e639824845386491a323b06f 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 +DIST mautrix-discord-0.6.2.gh.tar.gz 113457 BLAKE2B 0f2b142cba038e2f86dbf1d0133c01ab3f1c6ccaacc931adacca31e5c5061a45e678273b6bd8c5a134b0466ffd25088fe79a0e9214484356d953eb5f0a2689cd SHA512 2990964fd7aae20fdfc0689c9a90986093f64a646ee476c4d63c3b9c5b164283d830e83230c68ca732d32f7f0f525ff38ec968b41464c8c2e5ff319a504d613a +DIST mautrix-discord-0.6.2.tar.xz 67543704 BLAKE2B c803893b1d666c14e181b60d31378acbba940639b71a3af55c3b24ee0697ff58b84a9b8365ff0acef1939f7bc1ccb4deeac6def1a7e1d065079e0c169670f396 SHA512 ee291a97141800d0791cb1074840782ab649c15b78aac865f312b2a02dee6f03007ab0e1ce51472fe23b2223db89da276e4d9d4ee8d6e4e40e361360957ca2fb diff --git a/net-im/mautrix-discord/mautrix-discord-0.6.2.ebuild b/net-im/mautrix-discord/mautrix-discord-0.6.2.ebuild new file mode 100644 index 0000000000..c282376a5d --- /dev/null +++ b/net-im/mautrix-discord/mautrix-discord-0.6.2.ebuild @@ -0,0 +1,65 @@ +# 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 + dev-util/lottieconverter +" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-lang/go-1.20.0" + +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" +}