From def8d3ab7d887db5b9a4101133145b8d1c462216 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Wed, 13 Oct 2021 11:13:45 -0400 Subject: [PATCH 1/3] New package: python3-mautrix-0.12.5 --- srcpkgs/python3-mautrix/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/python3-mautrix/template diff --git a/srcpkgs/python3-mautrix/template b/srcpkgs/python3-mautrix/template new file mode 100644 index 000000000000..4c71f36d7b05 --- /dev/null +++ b/srcpkgs/python3-mautrix/template @@ -0,0 +1,16 @@ +# Template file for 'python3-mautrix' +pkgname=python3-mautrix +version=0.12.5 +revision=1 +wrksrc="mautrix-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-aiohttp python3-attrs python3-yarl" +short_desc="Python 3 asyncio Matrix framework" +maintainer="Joel Beckmeyer " +license="MPL-2.0" +homepage="https://github.com/mautrix/python" +distfiles="${PYPI_SITE}/m/mautrix/mautrix-${version}.tar.gz" +checksum=f7095cc4e5aa85043416fbfc5ca3e03c46800dcebfe3ac1d502e520197cea1ee +# tests require unpackaged python modules aiosqlite and asyncpg +make_check=no From fbfd6eeb91c75bff988fe38c74e707310221939b Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 12 Oct 2021 13:34:46 -0400 Subject: [PATCH 2/3] New package: python3-questionary-1.10.0 --- srcpkgs/python3-questionary/template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 srcpkgs/python3-questionary/template diff --git a/srcpkgs/python3-questionary/template b/srcpkgs/python3-questionary/template new file mode 100644 index 000000000000..9e38f9962a06 --- /dev/null +++ b/srcpkgs/python3-questionary/template @@ -0,0 +1,19 @@ +# Template file for 'python3-questionary' +pkgname=python3-questionary +version=1.10.0 +revision=1 +wrksrc="questionary-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-prompt_toolkit" +short_desc="Python library to build pretty command line user prompts" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://github.com/tmbo/questionary" +distfiles="${PYPI_SITE}/q/questionary/questionary-${version}.tar.gz" +checksum=600d3aefecce26d48d97eee936fdb66e4bc27f934c3ab6dd1e292c4f43946d90 +make_check=no # tests not updated to support Python 3.10 yet + +post_install() { + vlicense LICENSE +} From 8537d1470df960c9c90c10094e25a9ce0a88d294 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 11 Oct 2021 20:04:57 -0400 Subject: [PATCH 3/3] New package: maubot-0.2.0 --- srcpkgs/maubot/INSTALL | 5 +++ srcpkgs/maubot/files/maubot/log/run | 1 + srcpkgs/maubot/files/maubot/run | 7 ++++ srcpkgs/maubot/template | 56 +++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 srcpkgs/maubot/INSTALL create mode 120000 srcpkgs/maubot/files/maubot/log/run create mode 100755 srcpkgs/maubot/files/maubot/run create mode 100644 srcpkgs/maubot/template diff --git a/srcpkgs/maubot/INSTALL b/srcpkgs/maubot/INSTALL new file mode 100644 index 000000000000..d25382425381 --- /dev/null +++ b/srcpkgs/maubot/INSTALL @@ -0,0 +1,5 @@ +case "${ACTION}" in +post) + chown _maubot:_maubot etc/maubot/config.yaml + ;; +esac diff --git a/srcpkgs/maubot/files/maubot/log/run b/srcpkgs/maubot/files/maubot/log/run new file mode 120000 index 000000000000..3a5b4a586051 --- /dev/null +++ b/srcpkgs/maubot/files/maubot/log/run @@ -0,0 +1 @@ +/usr/bin/vlogger \ No newline at end of file diff --git a/srcpkgs/maubot/files/maubot/run b/srcpkgs/maubot/files/maubot/run new file mode 100755 index 000000000000..daf5f708edd5 --- /dev/null +++ b/srcpkgs/maubot/files/maubot/run @@ -0,0 +1,7 @@ +#!/bin/sh +exec 2>&1 +/usr/bin/alembic -x config=/etc/maubot/config.yaml \ + -c /usr/share/maubot/alembic.ini upgrade head +exec chpst -u _maubot:_maubot /usr/bin/python -m maubot \ + -c /etc/maubot/config.yaml \ + -b /usr/share/maubot/example-config.yaml diff --git a/srcpkgs/maubot/template b/srcpkgs/maubot/template new file mode 100644 index 000000000000..ba9c63e0af30 --- /dev/null +++ b/srcpkgs/maubot/template @@ -0,0 +1,56 @@ +# Template file for 'maubot' +pkgname=maubot +version=0.2.0 +revision=1 +wrksrc="maubot-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-mautrix python3-aiohttp python3-yarl python3-SQLAlchemy + python3-alembic python3-commonmark python3-ruamel.yaml python3-attrs + python3-bcrypt python3-packaging python3-click python3-colorama + python3-questionary python3-Jinja2" +short_desc="Plugin-based Matrix bot system" +maintainer="Joel Beckmeyer " +license="AGPL-3.0-or-later" +homepage="https://github.com/maubot/maubot" +distfiles="${PYPI_SITE}/m/maubot/maubot-${version}.tar.gz" +checksum=1c7a99bbbefbe4cbdf4a69034736e837119180acaa270a095cc19981f7ce9bfb +make_check=no # no tests specified + +conf_files="/etc/maubot/config.yaml" + +system_accounts="_maubot" +_maubot_homedir="/var/lib/maubot" + +make_dirs=" + /var/lib/maubot 0700 _maubot _maubot + /var/lib/maubot/plugins 0700 _maubot _maubot + /var/lib/maubot/trash 0700 _maubot _maubot + /var/lib/maubot/crypto 0700 _maubot _maubot + /var/log/maubot 0700 _maubot _maubot +" + +post_patch() { + vsed -i -e 's,sqlite:///maubot.db,sqlite:////var/lib/maubot/maubot.db,' \ + -e 's,./plugins,/var/lib/maubot/plugins,' \ + -e 's,./trash,/var/lib/maubot/trash,' \ + -e 's,./crypto,/var/lib/maubot/crypto,' \ + -e 's,./maubot.log,/var/log/maubot/maubot.log,' maubot/example-config.yaml + vsed -i 's,script_location = alembic,script_location=/usr/lib/maubot/alembic,' alembic.ini +} + +post_install() { + vsv maubot + + vmkdir usr/lib/maubot + mv ${DESTDIR}/usr/alembic ${DESTDIR}/usr/lib/maubot + + vmkdir etc/maubot + cp ${DESTDIR}/usr/example-config.yaml ${DESTDIR}/etc/maubot/config.yaml + + vmkdir usr/share/maubot + mv ${DESTDIR}/usr/alembic.ini ${DESTDIR}/usr/share/maubot + mv ${DESTDIR}/usr/example-config.yaml ${DESTDIR}/usr/share/maubot + + vlicense LICENSE +}