diff options
Diffstat (limited to 'net-im/mautrix-signal')
-rw-r--r-- | net-im/mautrix-signal/Manifest | 2 | ||||
-rw-r--r-- | net-im/mautrix-signal/mautrix-signal-0.7.3.ebuild | 66 |
2 files changed, 68 insertions, 0 deletions
diff --git a/net-im/mautrix-signal/Manifest b/net-im/mautrix-signal/Manifest index 66063c380..00f76aaaf 100644 --- a/net-im/mautrix-signal/Manifest +++ b/net-im/mautrix-signal/Manifest @@ -2,3 +2,5 @@ DIST mautrix-signal-0.6.0-deps.tar.xz 23987148 BLAKE2B 67ef4ae365b2f3bd5ac98d371 DIST mautrix-signal-0.6.0.gh.tar.gz 329464 BLAKE2B 723bb833c712c42e82bcf80fd205b8bf6371818a9631823cd68daa2d29c91cd00eafd6daa2b1d5278f808e7114babd7a572200f6738066225f7e97a18a9a81f5 SHA512 ac55ed462b442bc28045bd639359151b5717fef374f74a150c6597f4252cfb406c16de2b7989cb49b5e0e3c29f447427e19ac860048f7a9b2b020823694ffdba DIST mautrix-signal-0.6.1-deps.tar.xz 20518340 BLAKE2B 5329b1b839a20160e10736b2cadcc3baf9c5a62cc95e992dad70d3a5c2eb0cba73bef7ee256967ffa11c137f0ace08c31f37016362d3bda679f019f0d79d2e30 SHA512 be26db727443d479b5c948e316e6ba259e6e6636aa8bd72b3987676fd8902c2cc46e48888249d977e2fe0985dbf0d39650d5487e6b78cb9454a201ca980540a0 DIST mautrix-signal-0.6.1.gh.tar.gz 330028 BLAKE2B d2474ffa525f738e739e3bfce2fdfc9725e339a7615c75c468b3704a755e32c64eca6ca72a30719586f97b777e916e2777bd450f9217631a26e5b45b311c2acf SHA512 36d15e65d916ddbb97d3bfb62c73b5c481fecd65d145c41d7580f5eb3f575daeb057aa6a8b9ad8b35bfc20117a2adcfe7d239aa30802e04dd2f8c9ff9a2b34ce +DIST mautrix-signal-0.7.3-deps.tar.xz 32503216 BLAKE2B c92ddfb270bf8a86eb7f30b034127a4f240b2558658fa6709197b7eadcd92c54d7e98f48ae5330ceeae55bb0d31fe64895fd40fe08776eaa0a0aead45fafd3af SHA512 e4bb490e0347bfe000b65cacc16e6fd837fe18f88a0d03f31d6197f7fdb745bdf81347fe051906bbb5e685a306ae964d71fb50f375fa26acf7d9b59559609c26 +DIST mautrix-signal-0.7.3.gh.tar.gz 268741 BLAKE2B 4b07ff54663b7895e84c1baf5fc5f2db5b35e115d69a72cb1a218bbfaa10c3f38c026cc53008178df70dc9373187e31c9977ef7e8820f0b55a1e4abf63bf2d80 SHA512 34b9e9e2acdee1d2a68081befa11bf1972c936972c72575a28c149a6620cc10a9381287d5d6553d34bc06b2e77a35ab23070f4f3f7c4e2594454fa24e7548913 diff --git a/net-im/mautrix-signal/mautrix-signal-0.7.3.ebuild b/net-im/mautrix-signal/mautrix-signal-0.7.3.ebuild new file mode 100644 index 000000000..dd4366f3e --- /dev/null +++ b/net-im/mautrix-signal/mautrix-signal-0.7.3.ebuild @@ -0,0 +1,66 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module systemd + +DESCRIPTION="A Matrix-Signal puppeting bridge" +HOMEPAGE="https://github.com/mautrix/signal" +SRC_URI="https://github.com/mautrix/signal/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz + https://jroy.ca/dist/${P}-deps.tar.xz +" +S="${WORKDIR}/signal-${PV}" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + acct-user/${PN} +" +DEPEND="${RDEPEND}" +BDEPEND=" + ~dev-libs/libsignal-ffi-0.62.0 + dev-libs/olm +" + +src_compile() { + ego build "${S}"/cmd/"${PN}" +} + +src_install() { + dobin mautrix-signal + + keepdir /var/log/mautrix/signal + fowners -R root:mautrix /var/log/mautrix + fperms -R 770 /var/log/mautrix + sed -i -e "s/\.\/logs/\/var\/log\/${PN/-/\\\/}/" "${S}/pkg/connector/example-config.yaml" || die + + insinto "/etc/mautrix" + newins "${S}/pkg/connector/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" +} |