mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
net-im/mautrix-telegram: add 0.15.3
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST mautrix-telegram-0.15.2.tar.gz 255865 BLAKE2B 841f1f0872505f12f45b2a0862314eb057952b8b4a2ba55d314ccf71bbe4957a602bfeb061a1137c4af320f9900b6862b4ee9c754c367818e369e6044a8e776e SHA512 a2df56d58905044e8eb2303e5d6377248ca8911bdfc982e8bd290cc897dbfcde8798e3f1b1c1ad84243febdfb387aae312d83c93443320efc1fa56f95903a486
|
||||
DIST mautrix_telegram-0.15.3.tar.gz 257103 BLAKE2B 78f4d18da708f37815c53180fa1b82f6b6ec0124db89470bd07244ba0c17c35ab5287b1abae4608df2d304a0dc21e14939f5c6880e46709b089a1c1f7deef221 SHA512 23bdde48064d8761bd34a20e816e6585a35f99b46c9c362dcfe48336d743df1385e822df477806359110eff088dc80e4d196ec643a1074a4fbc472f82bbac5e5
|
||||
|
||||
104
net-im/mautrix-telegram/mautrix-telegram-0.15.3.ebuild
Normal file
104
net-im/mautrix-telegram/mautrix-telegram-0.15.3.ebuild
Normal file
@@ -0,0 +1,104 @@
|
||||
# Copyright 2022-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
|
||||
inherit distutils-r1 optfeature pypi systemd
|
||||
|
||||
DESCRIPTION="A Matrix-Telegram Messenger puppeting bridge "
|
||||
HOMEPAGE="https://github.com/mautrix/telegram/"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="crypt minimal +qrcode socks5 sqlite"
|
||||
|
||||
RDEPEND="
|
||||
acct-user/mautrix-telegram
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/asyncpg[${PYTHON_USEDEP}]
|
||||
dev-python/commonmark[${PYTHON_USEDEP}]
|
||||
dev-python/mako[${PYTHON_USEDEP}]
|
||||
dev-python/mautrix[crypt?,${PYTHON_USEDEP}]
|
||||
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/tulir-telethon-1.99.0_alpha6[${PYTHON_USEDEP}]
|
||||
dev-python/yarl[${PYTHON_USEDEP}]
|
||||
|| (
|
||||
dev-python/python-magic[${PYTHON_USEDEP}]
|
||||
sys-apps/file[python,${PYTHON_USEDEP}]
|
||||
)
|
||||
!minimal? (
|
||||
app-arch/brotli[python,${PYTHON_USEDEP}]
|
||||
dev-python/aiodns[${PYTHON_USEDEP}]
|
||||
dev-python/cryptg[${PYTHON_USEDEP}]
|
||||
dev-python/phonenumbers[${PYTHON_USEDEP}]
|
||||
)
|
||||
qrcode? (
|
||||
dev-python/pillow[${PYTHON_USEDEP}]
|
||||
dev-python/qrcode[${PYTHON_USEDEP}]
|
||||
)
|
||||
socks5? ( dev-python/python-socks[${PYTHON_USEDEP}] )
|
||||
sqlite? ( dev-python/aiosqlite[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
EPYTEST_PLUGINS=( pytest-import-check )
|
||||
|
||||
distutils_enable_tests import-check
|
||||
|
||||
python_test() {
|
||||
local sitedir="${BUILD_DIR}/install$(python_get_sitedir)"
|
||||
local EPYTEST_IGNORE=(
|
||||
"${sitedir}/mautrix_telegram/__main__.py"
|
||||
"${sitedir}/mautrix_telegram/abstract_user.py"
|
||||
"${sitedir}/mautrix_telegram/scripts/unicodemojipack/__main__.py"
|
||||
)
|
||||
|
||||
epytest --import-check "${sitedir}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
|
||||
keepdir /var/log/mautrix
|
||||
fowners root:mautrix /var/log/mautrix
|
||||
fperms 770 /var/log/mautrix
|
||||
|
||||
mkdir -p "${ED}"/etc/mautrix || die
|
||||
sed -i "${ED}/usr/example-config.yaml" \
|
||||
-e "s:\./mautrix-telegram.log:/var/log/mautrix/${PN}.log:" || die
|
||||
mv "${ED}"/usr/example-config.yaml "${ED}"/etc/mautrix/mautrix_telegram.yaml || die
|
||||
|
||||
newinitd "${FILESDIR}"/mautrix-telegram.initd-r1 mautrix-telegram
|
||||
newconfd "${FILESDIR}"/mautrix-telegram.confd mautrix-telegram
|
||||
systemd_dounit "${FILESDIR}"/mautrix-telegram.service
|
||||
|
||||
fowners -R root:mautrix /etc/mautrix
|
||||
fperms -R 770 /etc/mautrix
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Prometheus statistics support" dev-python/prometheus_client
|
||||
|
||||
einfo
|
||||
elog "Before you can use mautrix-telegram, you need to configure it correctly."
|
||||
elog "The configuration file is located at \"/etc/mautrix/mautrix_telegram.yaml\""
|
||||
elog
|
||||
elog "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_telegram/registration.yaml"
|
||||
elog
|
||||
elog "Finally, you may start the mautrix-telegram daemon."
|
||||
einfo
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
su - mautrix-telegram -s /bin/sh -c \
|
||||
"/usr/bin/python -m mautrix_telegram -c /etc/mautrix/mautrix_telegram.yaml -g -r /var/lib/mautrix_telegram/registration.yaml"
|
||||
}
|
||||
Reference in New Issue
Block a user