net-im/maubot: new package, add 0.4.2

Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
Julien Roy
2024-05-24 14:28:13 -04:00
parent f363fbfc69
commit 32cdbd6f04
5 changed files with 121 additions and 0 deletions

1
net-im/maubot/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST maubot-0.4.2.tar.gz 1981478 BLAKE2B 47ed5ef89b37099ee071a08914bf0f7ae49c7f53786696d29e5f5a58ecae7dab4707b7bd2ac59bbc8246778a9c0ef487d5724fe5b61342f52637e0a0c74a7298 SHA512 136cc8870de804f0cf8b85efa21ed16ef56f803c64e8f04562b5c69402573596edf87a9c783670d09878f4cbf59613553ce6898c11aa166248d02d26704f7921

View File

@@ -0,0 +1,28 @@
#!/sbin/openrc-run
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="maubot daemon"
description="A plugin-based Matrix bot system"
module="maubot"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/python"
command_args="-m ${module} -c /etc/maubot/${module}.yaml"
command_background=true
command_user="maubot:maubot"
output_log="/var/log/maubot/maubot_daemon.log"
error_log="/var/log/maubot/maubot_daemon.log"
depend() {
need net
}
start_pre() {
checkpath -d -m 0755 -o "$command_user" /var/lib/maubot
checkpath -d -m 0755 -o "$command_user" /var/lib/maubot/plugins
checkpath -d -m 0755 -o "$command_user" /var/lib/maubot/logs
checkpath -d -m 0755 -o "$command_user" /var/lib/maubot/trash
checkpath -f -m 0644 -o "$command_user" "$output_log"
}

View File

@@ -0,0 +1,12 @@
[Unit]
Description=A plugin-based Matrix bot system
After=network.target
[Service]
User=maubot
Group=maubot
Restart=always
ExecStart=/usr/bin/python -m maubot -c /etc/maubot/maubot.yaml
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,61 @@
# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYPI_NO_NORMALIZE=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1 pypi systemd
DESCRIPTION="Plugin-based Matrix bot system"
HOMEPAGE="https://github.com/maubot/maubot/"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/maubot
dev-python/aiohttp[${PYTHON_USEDEP}]
dev-python/aiosqlite[${PYTHON_USEDEP}]
dev-python/attrs[${PYTHON_USEDEP}]
dev-python/asyncpg[${PYTHON_USEDEP}]
dev-python/bcrypt[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/commonmark[${PYTHON_USEDEP}]
dev-python/cryptg[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]
dev-python/mautrix[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
dev-python/python-olm[${PYTHON_USEDEP}]
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
dev-python/sqlalchemy[${PYTHON_USEDEP}]
dev-python/unpaddedbase64[${PYTHON_USEDEP}]
dev-python/yarl[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
src_install() {
distutils-r1_src_install
keepdir /var/log/maubot
fowners root:maubot /var/log/maubot
fperms 770 /var/log/maubot
sed -i -e "s/\.\/${PN}.log/\/var\/log\/maubot\/${PN}.log/" "${ED}/usr/example-config.yaml" || die
sed -i -e "s/\.\/plugins/\/var\/lib\/maubot\/plugins/g" "${ED}/usr/example-config.yaml" || die
sed -i -e "s/\.\/trash/\/var\/lib\/maubot\/trash/g" "${ED}/usr/example-config.yaml" || die
insinto "/etc/maubot"
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:maubot /etc/maubot
fperms -R 770 /etc/maubot
}

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/maubot/maubot/releases</changelog>
<doc>https://docs.mau.fi/maubot/</doc>
<bugs-to>https://github.com/maubot/maubot/issues</bugs-to>
<remote-id type="github">maubot/maubot</remote-id>
<remote-id type="pypi">maubot</remote-id>
</upstream>
</pkgmetadata>