Merge pull request 'feature/mautrix-signal' (#171) from feature/mautrix-signal into main
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #171
This commit is contained in:
commit
3909beb22e
5 changed files with 140 additions and 0 deletions
14
metadata/md5-cache/net-im/mautrix-signal-25.10
Normal file
14
metadata/md5-cache/net-im/mautrix-signal-25.10
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
BDEPEND=>=dev-lang/go-1.20:= app-arch/unzip virtual/pkgconfig
|
||||
DEFINED_PHASES=compile config install postinst setup test unpack
|
||||
DEPEND=acct-user/mautrix-signal dev-libs/olm virtual/zlib:= ~dev-libs/libsignal-ffi-0.84.0
|
||||
DESCRIPTION=Matrix-Signal puppeting bridge
|
||||
EAPI=8
|
||||
HOMEPAGE=https://github.com/mautrix/signal
|
||||
INHERIT=go-module systemd toolchain-funcs
|
||||
KEYWORDS=~amd64
|
||||
LICENSE=AGPL-3+ AGPL-3 Apache-2.0 BSD GPL-3+ ISC MIT MPL-2.0 public-domain
|
||||
RDEPEND=acct-user/mautrix-signal dev-libs/olm virtual/zlib:=
|
||||
SLOT=0
|
||||
SRC_URI=https://github.com/mautrix/signal/archive/refs/tags/v0.2510.0.tar.gz -> mautrix-signal-25.10.tar.gz https://github.com/gentoo-golang-dist/signal/releases/download/v0.2510.0/signal-0.2510.0-vendor.tar.xz
|
||||
_eclasses_=multiprocessing 1e32df7deee68372153dca65f4a7c21f toolchain-funcs 30214924c0c3b92ec7dbf24fc70d60d3 flag-o-matic a7afe42e95fb46ce9691605acfb24672 go-env 0e2babf96e7d0b045fc07ad199eb2399 go-module d96f2a2fd6d8fbad6d94516bf238f885 systemd a964c0cbe818b5729da1dbfcee5be861
|
||||
_md5_=10be7987fbc6b86922504ed6f059ff3f
|
||||
5
net-im/mautrix-signal/Manifest
Normal file
5
net-im/mautrix-signal/Manifest
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
AUX mautrix-signal.confd 133 BLAKE2B a232ec04a3749aaace59c1d78d55c1b6f20dccf985aa9670103001fadff4b72e30e73477235449e3b69942b86bb279a155aa6f1bf3e1ed8756876a7a49a68f81 SHA512 3ce719ab7a309399e75c03bef0f6561472f80386b2186c1baf1eb70fef4f02275b6f4bd73d939e952fc981a92d96f4ca017045542024567923f380934e3c4d7b
|
||||
AUX mautrix-signal.initd-r1 525 BLAKE2B e29f39777296b867d972d4f4e9b8015c0846eb9676bdd3e49145d8e62c80109a6e3a3eb6cf528772e0220cfdcb802af47c6b20c2e7a794b3ea1e2213c9559daa SHA512 209967f9dfe2ec5c425bbb7606c015be17bbc98aaba94add823a26575bde53db3bfc7eca0f8d662bbb2e26d67a973ac0b13145f4c65b5c61115a8ef935832ce2
|
||||
DIST mautrix-signal-25.10.tar.gz 381872 BLAKE2B 706f8fd175bbc1e73ea41b7f4cb5d55c09a5d339d9acf7e27da21104710c4342aca6e421ab6827de35650c8bf877c46f14dc93e8b58fbd124432c26315d738e2 SHA512 85abb9715f0239ce647ce7a7f9f9332a1060e2fb95ed10a33399f31728df29864e207c2f8f1eacdf446125db67ba0d0e01fc5d762bbda53adbc39ab1d0eb08ac
|
||||
DIST signal-0.2510.0-vendor.tar.xz 3697400 BLAKE2B 7d6a9f36d7707f5e93318c32f2a98e50ca6d63d0c728f3c38adfdb456146df03a5e22f3a3bcfd94e8631e20accd30e7931d0cda3a6175bb9075db6777e3749c1 SHA512 4112a3d3fe67c3ddcc60a9580ff92f2008739ff2cc1ed37a8a64071e782d4030b407df4f1e9dec514972060de68033c19be6c4fe0fd781fd25b16510ffc8f0ee
|
||||
EBUILD mautrix-signal-25.10.ebuild 2749 BLAKE2B c1f8a6fc4c600e280ccc95a8a83ad2cdd9739333ef0f68f7e007a6a225c8840e4773e4690525ea71bddc4ad224f6f97b6218f734b72ec6c7783262c0b2ef239a SHA512 022d02eb8752291140481c80222845f19ba9a38db652a028764c3747327a638be3764ef3111dcf756375bfd4bd9107a898bb646d08b217ade9f5e301d7aee17c
|
||||
5
net-im/mautrix-signal/files/mautrix-signal.confd
Normal file
5
net-im/mautrix-signal/files/mautrix-signal.confd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Configuration file
|
||||
#MAUTRIX_SIGNAL_CONFIG="/etc/mautrix/mautrix_signal.yaml"
|
||||
|
||||
# Extra command-line options
|
||||
#MAUTRIX_SIGNAL_OPTS=""
|
||||
21
net-im/mautrix-signal/files/mautrix-signal.initd-r1
Normal file
21
net-im/mautrix-signal/files/mautrix-signal.initd-r1
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/sbin/openrc-run
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Matrix-Signal puppeting bridge"
|
||||
supervisor="supervise-daemon"
|
||||
command="/usr/bin/mautrix-signal"
|
||||
command_args="-c ${MAUTRIX_SIGNAL_CONFIG} ${MAUTRIX_SIGNAL_OPTS}"
|
||||
command_user="mautrix-signal:mautrix"
|
||||
pidfile="/run/mautrix-signal/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o "${command_user}" /run/mautrix-signal
|
||||
}
|
||||
95
net-im/mautrix-signal/mautrix-signal-25.10.ebuild
Normal file
95
net-im/mautrix-signal/mautrix-signal-25.10.ebuild
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# Copyright 2022-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module systemd toolchain-funcs
|
||||
|
||||
MY_PV="0.$(ver_rs 1-2 '').0"
|
||||
DESCRIPTION="Matrix-Signal puppeting bridge"
|
||||
HOMEPAGE="https://github.com/mautrix/signal"
|
||||
SRC_URI="https://github.com/mautrix/signal/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/gentoo-golang-dist/signal/releases/download/v${MY_PV}/signal-${MY_PV}-vendor.tar.xz"
|
||||
S="${WORKDIR}/signal-${MY_PV}"
|
||||
|
||||
LICENSE="AGPL-3+"
|
||||
# Go dependency licenses
|
||||
LICENSE+=" AGPL-3 Apache-2.0 BSD GPL-3+ ISC MIT MPL-2.0 public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
acct-user/mautrix-signal
|
||||
dev-libs/olm
|
||||
virtual/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
~dev-libs/libsignal-ffi-0.84.0
|
||||
"
|
||||
|
||||
DOCS=( {CHANGELOG,README,ROADMAP}.md )
|
||||
|
||||
pkg_setup() {
|
||||
[[ ${MERGE_TYPE} == "binary" ]] && return 0
|
||||
|
||||
# https://github.com/mautrix/signal/issues/595
|
||||
tc-is-clang && die "Clang compiler is not supported"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local MAUTRIX_VERSION=$(awk '/maunium\.net\/go\/mautrix / { print $2 }' go.mod)
|
||||
local BUILD_TIME=$(date -Iseconds)
|
||||
local go_ldflags=(
|
||||
-X "main.Tag=v${MY_PV}"
|
||||
-X "main.BuildTime=${BUILD_TIME}"
|
||||
-X "maunium.net/go/mautrix.GoModVersion=${MAUTRIX_VERSION}"
|
||||
)
|
||||
|
||||
ego build -ldflags "${go_ldflags[*]}" ./cmd/mautrix-signal
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin mautrix-signal
|
||||
einstalldocs
|
||||
|
||||
newinitd "${FILESDIR}"/mautrix-signal.initd-r1 mautrix-signal
|
||||
newconfd "${FILESDIR}"/mautrix-signal.confd mautrix-signal
|
||||
systemd_dounit "${FILESDIR}"/mautrix-signal.service
|
||||
|
||||
local dir
|
||||
for dir in /var/log/mautrix /etc/mautrix; do
|
||||
keepdir "${dir}"
|
||||
fowners -R root:mautrix "${dir}"
|
||||
fperms 770 "${dir}"
|
||||
done
|
||||
|
||||
keepdir /var/lib/mautrix/signal
|
||||
fowners -R mautrix-signal:mautrix /var/lib/mautrix/signal
|
||||
}
|
||||
|
||||
src_test() {
|
||||
ego test -vet=off ./...
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo
|
||||
elog "Before you can use mautrix-signal, you need to configure it correctly."
|
||||
elog "To generate the configuration file, use the following command:"
|
||||
elog " # runuser -u mautrix-signal -g mautrix -- mautrix-signal -c /etc/mautrix/mautrix_signal.yaml -e"
|
||||
elog
|
||||
elog "Configure the /etc/mautrix/mautrix_signal.yaml file according to your"
|
||||
elog "homeserver. When done, run the following command:"
|
||||
elog " # emerge --config ${CATEGORY}/${PN}"
|
||||
elog
|
||||
elog "Then, you need to register the bridge with your homeserver."
|
||||
elog "Refer your homeserver's documentation for instructions."
|
||||
elog "The registration file is located at /var/lib/mautrix/signal/registration.yaml"
|
||||
elog
|
||||
elog "Finally, you may start the mautrix-signal daemon."
|
||||
einfo
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
runuser -u mautrix-signal -g mautrix -- \
|
||||
mautrix-signal -c /etc/mautrix/mautrix_signal.yaml -g -r /var/lib/mautrix/signal/registration.yaml
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue