net-im/mautrix-telegram: new package, add 0.15.0

This commit is contained in:
Alarig Le Lay 2023-12-10 15:47:56 +01:00
parent 25922c57a0
commit f229af046a
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
9 changed files with 159 additions and 3 deletions

View File

@ -12,5 +12,5 @@ REQUIRED_USE=|| ( python_targets_python3_10 )
RESTRICT=!test? ( test ) !test? ( test )
SLOT=0
SRC_URI=https://files.pythonhosted.org/packages/source/m/mautrix/mautrix-0.19.11.tar.gz
_eclasses_=toolchain-funcs edeef89edaf21d30225d31702ab117ac multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic baa4d385108ac87993edac956a916a36 out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild 30dbf3c5a31db09a19f31ad0a68f2405 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 python-utils-r1 f6221c2f55e5e832be9919fe1711f33b python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 d05609532b134be7c4ae2514f4c7d06e optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 pypi 2eecb475512bc76e5ea9192a681b9e6b
_eclasses_=toolchain-funcs eed10cf5e5a06916e654d31f5a1925cc multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic b97a0a7215b2f463a485ff0599ab30bb out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild d67e78a235f541871c7dfe4cf7931489 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 python-utils-r1 e989dbdcbb647bd8655857c1f95be244 python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 ae136dc2e1c0006e9480d44a6c1886d9 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 pypi 2eecb475512bc76e5ea9192a681b9e6b
_md5_=00ca1259f5cad9857d637c1c9042eee3

View File

@ -13,5 +13,5 @@ REQUIRED_USE=|| ( python_targets_python3_10 )
RESTRICT=!test? ( test ) !test? ( test )
SLOT=0
SRC_URI=https://github.com/mautrix/python/archive/v0.19.7.tar.gz -> mautrix-0.19.7.gh.tar.gz
_eclasses_=toolchain-funcs edeef89edaf21d30225d31702ab117ac multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic baa4d385108ac87993edac956a916a36 out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild 30dbf3c5a31db09a19f31ad0a68f2405 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 python-utils-r1 f6221c2f55e5e832be9919fe1711f33b python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 d05609532b134be7c4ae2514f4c7d06e optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54
_eclasses_=toolchain-funcs eed10cf5e5a06916e654d31f5a1925cc multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic b97a0a7215b2f463a485ff0599ab30bb out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild d67e78a235f541871c7dfe4cf7931489 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 python-utils-r1 e989dbdcbb647bd8655857c1f95be244 python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 ae136dc2e1c0006e9480d44a6c1886d9 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54
_md5_=a1cf5818a11b2ceb5819a4566305ffd2

View File

@ -12,5 +12,5 @@ REQUIRED_USE=|| ( python_targets_pypy3 python_targets_python3_10 )
RESTRICT=!test? ( test )
SLOT=0
SRC_URI=mirror://sourceforge/ruamel-dl-tagged-releases/ruamel.yaml-0.16.13.tar.xz -> ruamel-yaml-0.16.13.tar.xz
_eclasses_=toolchain-funcs edeef89edaf21d30225d31702ab117ac multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic baa4d385108ac87993edac956a916a36 out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild 30dbf3c5a31db09a19f31ad0a68f2405 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 eapi8-dosym 5ac4857ad078256d939c44f7c64197a9 python-utils-r1 f6221c2f55e5e832be9919fe1711f33b python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 d05609532b134be7c4ae2514f4c7d06e
_eclasses_=toolchain-funcs eed10cf5e5a06916e654d31f5a1925cc multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic b97a0a7215b2f463a485ff0599ab30bb out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild d67e78a235f541871c7dfe4cf7931489 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 eapi8-dosym 5ac4857ad078256d939c44f7c64197a9 python-utils-r1 e989dbdcbb647bd8655857c1f95be244 python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 ae136dc2e1c0006e9480d44a6c1886d9
_md5_=ce757ac2aa3019e1cb37e930744c4b1d

View File

@ -0,0 +1,16 @@
BDEPEND=python_targets_python3_10? ( dev-lang/python:3.10 ) python_targets_python3_11? ( dev-lang/python:3.11 ) >=dev-python/gpep517-15[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/setuptools-67.8.0-r1[python_targets_python3_10(-)?,python_targets_python3_11(-)?] virtual/pkgconfig
DEFINED_PHASES=compile config configure install postinst prepare test
DEPEND=acct-user/mautrix-telegram app-arch/brotli[python] dev-python/aiohttp[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/aiodns[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/asyncpg-0.20[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/asyncpg-0.30[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/commonmark[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/cryptg[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/mako[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/mautrix-0.20.3[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/mautrix-0.21[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/python-olm[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/phonenumbers[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/pycryptodome[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/python-magic[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/qrcode[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/ruamel-yaml-0.15.35[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/ruamel-yaml-0.19[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/tulir-telethon-1.33.0_alpha1[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/unpaddedbase64[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/yarl[python_targets_python3_10(-)?,python_targets_python3_11(-)?]
DESCRIPTION=A Matrix-Telegram Messenger puppeting bridge
EAPI=8
HOMEPAGE=https://github.com/mautrix/telegram/
INHERIT=distutils-r1 optfeature systemd
IUSE=python_targets_python3_10 python_targets_python3_11
KEYWORDS=~amd64
LICENSE=AGPL-3
RDEPEND=acct-user/mautrix-telegram app-arch/brotli[python] dev-python/aiohttp[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/aiodns[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/asyncpg-0.20[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/asyncpg-0.30[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/commonmark[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/cryptg[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/mako[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/mautrix-0.20.3[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/mautrix-0.21[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/python-olm[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/phonenumbers[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/pycryptodome[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/python-magic[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/qrcode[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/ruamel-yaml-0.15.35[python_targets_python3_10(-)?,python_targets_python3_11(-)?] !<dev-python/ruamel-yaml-0.19[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/tulir-telethon-1.33.0_alpha1[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/unpaddedbase64[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/yarl[python_targets_python3_10(-)?,python_targets_python3_11(-)?] python_targets_python3_10? ( dev-lang/python:3.10 ) python_targets_python3_11? ( dev-lang/python:3.11 )
REQUIRED_USE=|| ( python_targets_python3_10 python_targets_python3_11 )
SLOT=0
SRC_URI=https://github.com/mautrix/telegram/archive/v0.15.0.tar.gz -> mautrix-telegram-0.15.0.gh.tar.gz
_eclasses_=toolchain-funcs eed10cf5e5a06916e654d31f5a1925cc multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic b97a0a7215b2f463a485ff0599ab30bb out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild d67e78a235f541871c7dfe4cf7931489 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 39e7a84b06eff4efd9f2e0c3d1668b98 python-utils-r1 e989dbdcbb647bd8655857c1f95be244 python-r1 8a28fa6d3e3bc96ff8a7eff2badbe71f distutils-r1 ae136dc2e1c0006e9480d44a6c1886d9 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 systemd c8b03e8df84486aa991d4396686e8942
_md5_=6d117e3415bec33ca3081705f8735f39

View File

@ -0,0 +1 @@
DIST mautrix-telegram-0.15.0.gh.tar.gz 812940 BLAKE2B 39de28c44654255005521b82d1204e2ac6f5aefb9c48fef6775ec309f9b46026e586e8a2ee80023eba04771fd7ac485907e699ae086366280d3a33d27c4a84a1 SHA512 c1b569fb8235daae88e2c32ac07aabdc20bf312b6a01132160852049312fe76bd3fd1ae6aaf9674d9749c85aa9e25c77dd248c23c6003f6edc688484fbd2bae5

View File

@ -0,0 +1,25 @@
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="mautrix-telegram daemon"
description="A Matrix-Telegram Messenger puppeting bridge"
module="mautrix_telegram"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/python"
command_args="-m ${module} -c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/telegram/registration.yaml"
command_background=true
command_user="mautrix-telegram:mautrix"
output_log="/var/log/mautrix/mautrix-telegram_daemon.log"
error_log="/var/log/mautrix/mautrix-telegram_daemon.log"
depend() {
need net
}
start_pre() {
checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/telegram
checkpath -f -m 0644 -o "$command_user" "$output_log"
}

View File

@ -0,0 +1,12 @@
[Unit]
Description=A Matrix-Telegram Messenger puppeting bridge
After=network.target
[Service]
User=mautrix-telegram
Group=mautrix
Restart=always
ExecStart=/usr/bin/python -m mautrix_telegram -c /etc/mautrix/mautrix_telegram.yaml -r /var/lib/mautrix/telegram/registration.yaml
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,83 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..11} )
inherit distutils-r1 optfeature systemd
DESCRIPTION="A Matrix-Telegram Messenger puppeting bridge "
HOMEPAGE="https://github.com/mautrix/telegram/"
SRC_URI="https://github.com/mautrix/telegram/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/telegram-${PV}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/${PN}
app-arch/brotli[python]
dev-python/aiohttp[${PYTHON_USEDEP}]
dev-python/aiodns[${PYTHON_USEDEP}]
>=dev-python/asyncpg-0.20[${PYTHON_USEDEP}]
!<dev-python/asyncpg-0.30[${PYTHON_USEDEP}]
dev-python/commonmark[${PYTHON_USEDEP}]
dev-python/cryptg[${PYTHON_USEDEP}]
dev-python/mako[${PYTHON_USEDEP}]
>=dev-python/mautrix-0.20.3[${PYTHON_USEDEP}]
!<dev-python/mautrix-0.21[${PYTHON_USEDEP}]
dev-python/python-olm[${PYTHON_USEDEP}]
dev-python/phonenumbers[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
dev-python/python-magic[${PYTHON_USEDEP}]
dev-python/qrcode[${PYTHON_USEDEP}]
>=dev-python/ruamel-yaml-0.15.35[${PYTHON_USEDEP}]
!<dev-python/ruamel-yaml-0.19[${PYTHON_USEDEP}]
>=dev-python/tulir-telethon-1.33.0_alpha1[${PYTHON_USEDEP}]
dev-python/unpaddedbase64[${PYTHON_USEDEP}]
dev-python/yarl[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
src_install() {
distutils-r1_src_install
keepdir /var/log/mautrix
fowners root:mautrix /var/log/mautrix
fperms 770 /var/log/mautrix
sed -i -e "s/\.\/${PN}.log/\/var\/log\/mautrix\/${PN}.log/" "${ED}/usr/example-config.yaml" || die
insinto "/etc/mautrix"
newins "${ED}/usr/example-config.yaml" "${PN/-/_}.yaml"
rm "${ED}/usr/example-config.yaml" || die
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
fowners -R root:mautrix /etc/mautrix
fperms -R 770 /etc/mautrix
}
pkg_postinst() {
optfeature "Prometheus statistics" dev-python/prometheus_client
optfeature "Sqlite backend" dev-python/aiosqlite
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/python -m ${PN/-/_} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
}

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Julien Roy</name>
<email>julien@jroy.ca</email>
</maintainer>
<upstream>
<maintainer>
<name>Tulir Asokan</name>
<email>tulir@maunium.net</email>
</maintainer>
<changelog>https://github.com/mautrix/telegram/releases</changelog>
<doc>https://docs.mau.fi/bridges/python/telegram/index.html</doc>
<bugs-to>https://github.com/mautrix/telegram/issues</bugs-to>
<remote-id type="github">mautrix/telegram</remote-id>
<remote-id type="pypi">mautrix-telegram</remote-id>
</upstream>
</pkgmetadata>