Date: Wednesday, April 12, 2023 @ 18:24:23
Author: felixonmars
Revision: 1445016
archrelease: copy trunk to community-staging-any
Added:
weechat-matrix/repos/community-staging-any/
weechat-matrix/repos/community-staging-any/0001-Switch-to-correct-build-system-definition.patch
(from rev 1445015,
weechat-matrix/trunk/0001-Switch-to-correct-build-system-definition.patch)
weechat-matrix/repos/community-staging-any/PKGBUILD
(from rev 1445015, weechat-matrix/trunk/PKGBUILD)
weechat-matrix/repos/community-staging-any/keys/
weechat-matrix/repos/community-staging-any/weechat-matrix.install
(from rev 1445015, weechat-matrix/trunk/weechat-matrix.install)
------------------------------------------------------+
0001-Switch-to-correct-build-system-definition.patch | 27 ++++++
PKGBUILD | 66 +++++++++++++++++
weechat-matrix.install | 14 +++
3 files changed, 107 insertions(+)
Copied:
weechat-matrix/repos/community-staging-any/0001-Switch-to-correct-build-system-definition.patch
(from rev 1445015,
weechat-matrix/trunk/0001-Switch-to-correct-build-system-definition.patch)
===================================================================
--- community-staging-any/0001-Switch-to-correct-build-system-definition.patch
(rev 0)
+++ community-staging-any/0001-Switch-to-correct-build-system-definition.patch
2023-04-12 18:24:23 UTC (rev 1445016)
@@ -0,0 +1,27 @@
+From b05b004192f9922c90a4399bee5c1cacc5a48b67 Mon Sep 17 00:00:00 2001
+From: David Runge <[email protected]>
+Date: Mon, 9 Jan 2023 19:50:39 +0100
+Subject: [PATCH] Switch to correct build-system definition
+
+pyproject.toml:
+Use the correct PEP517 build-backend, as defined by poetry upstream
+(https://python-poetry.org/docs/pyproject#poetry-and-pep-517).
+---
+ pyproject.toml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 709adf1..d3292af 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -31,5 +31,5 @@ matrix_sso_helper = ["aiohttp"]
+ matrix_upload = ["python-magic", "requests"]
+
+ [build-system]
+-requires = ["poetry>=0.12"]
+-build-backend = "poetry.masonry.api"
++requires = ["poetry-core>=1.0.0"]
++build-backend = "poetry.core.masonry.api"
+--
+2.39.0
+
Copied: weechat-matrix/repos/community-staging-any/PKGBUILD (from rev 1445015,
weechat-matrix/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-12 18:24:23 UTC (rev 1445016)
@@ -0,0 +1,66 @@
+# Maintainer: Jonas Witschel <[email protected]>
+pkgname=weechat-matrix
+pkgver=0.3.0
+_tag=ebf792a233a50d639b13e5f7c9a1c1fe988e7476 # git rev-parse "$pkgver"
+pkgrel=10
+pkgdesc='WeeChat Matrix protocol script written in Python'
+arch=('any')
+url='https://github.com/poljar/weechat-matrix'
+license=('ISC')
+depends=('python' 'python-atomicwrites' 'python-attrs' 'python-cachetools'
'python-logbook' 'python-matrix-nio'
+ 'python-olm' 'python-peewee' 'python-pygments' 'python-pyopenssl'
'python-webcolors' 'weechat')
+makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core')
+checkdepends=('python-hypothesis' 'python-pytest')
+optdepends=('python-aiohttp: matrix_sso_helper support'
+ 'python-magic: matrix_upload support'
+ 'python-requests: matrix_decrypt and matrix_upload support'
+ 'xdg-utils: default plumber for matrix_decrypt')
+install='weechat-matrix.install'
+source=(
+ "git+$url.git?signed#tag=$_tag"
+ 0001-Switch-to-correct-build-system-definition.patch
+)
+sha512sums=('SKIP'
+
'65be133214b4497fead85e718d3dc57502063f4411c759d878e7132b2cb49befe5515714edda188169710c246537d893611aa8ef6faeaeab23762302e6e783b6')
+validpgpkeys=('689A3B5BC6560AB4C99A2A0581314DA807EF4E22') # Damir Jelić
(poljar) <[email protected]>
+
+pkgver() {
+ cd "$pkgname"
+ git describe | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+prepare() {
+ # fix PEP517 build-system definition:
https://github.com/poljar/weechat-matrix/pull/340/files
+ patch -Np1 -d $pkgname -i
../0001-Switch-to-correct-build-system-definition.patch
+
+ cd "$pkgname"
+ sed -ri 's|#!/usr/bin/env( -S)? python3|#!/usr/bin/python3|'
contrib/*.py
+
+ # Remove unnecessary dependency version pinning
+ sed -i 's/= "^[0-9.]*"/= "*"/' pyproject.toml
+
+ # SSLContext.set_npn_protocols broken in Python 3.10
+ # (https://github.com/poljar/weechat-matrix/issues/308)
+ git cherry-pick --no-commit 4e585d5f4628e6fbeba9ec4560b440d731e076f5
+}
+
+build() {
+ cd "$pkgname"
+ python -m build --wheel --no-isolation --skip-dependency-check
+}
+
+check() {
+ cd "$pkgname"
+ python -m pytest
+}
+
+package() {
+ cd "$pkgname"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm755 main.py
"$pkgdir/usr/share/weechat/python/weechat-matrix.py"
+ for _script in matrix_decrypt matrix_sso_helper matrix_upload
+ do
+ install -Dm755 "contrib/$_script.py" "$pkgdir/usr/bin/$_script"
+ done
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+}
Copied: weechat-matrix/repos/community-staging-any/weechat-matrix.install (from
rev 1445015, weechat-matrix/trunk/weechat-matrix.install)
===================================================================
--- community-staging-any/weechat-matrix.install
(rev 0)
+++ community-staging-any/weechat-matrix.install 2023-04-12 18:24:23 UTC
(rev 1445016)
@@ -0,0 +1,14 @@
+post_install() {
+ echo "To load this script, execute the following command in WeeChat:"
+ echo "/script load weechat-matrix.py"
+ echo "To load it automatically during WeeChat startup, use:"
+ echo "mkdir -p ~/.local/share/weechat/python/autoload"
+ echo "ln -s /usr/share/weechat/python/weechat-matrix.py -t
~/.local/share/weechat/python/autoload"
+}
+
+post_upgrade() {
+ if [ "$(vercmp "$2" 0.2.0-2)" -lt 0 ]
+ then
+ post_install
+ fi
+}