diff options
author | davidovski <david@davidovski.xyz> | 2022-06-27 23:09:07 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-06-27 23:09:07 +0100 |
commit | f6332a43c35387c4a2dea1746be5fd092890ae0e (patch) | |
tree | d6599f63de04096f3fc21a98e0b3bb39d55a3531 /repo/weechat-matrix/weechat-matrix.xibuild | |
parent | f13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (diff) |
added lf and iptables
Diffstat (limited to 'repo/weechat-matrix/weechat-matrix.xibuild')
-rw-r--r-- | repo/weechat-matrix/weechat-matrix.xibuild | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/repo/weechat-matrix/weechat-matrix.xibuild b/repo/weechat-matrix/weechat-matrix.xibuild new file mode 100644 index 0000000..fb9134e --- /dev/null +++ b/repo/weechat-matrix/weechat-matrix.xibuild @@ -0,0 +1,38 @@ +#!/bin/sh + +NAME="weechat-matrix" +DESC="WeeChat Matrix protocol script" + +MAKEDEPS="poetry python-build python-importlib-metadata python-installer python-poetry-core python-wheel python-webcolors python-hypothesis python-atomicwrites python-nio python-exceptiongroup python-sortedcontainers" +DEPS="python-build python-importlib-metadata python-poetry-core python-openssl python-logbook python-future python-nio python-webcolors python-matrix-nio python-atomicwrites" + +SOURCE="https://github.com/poljar/weechat-matrix.git" + +build() { + sed -i 's_#!/usr/bin/env -S python3 -u_#!/usr/bin/env python3 -u_g' contrib/matrix_sso_helper.py contrib/matrix_upload.py + GIT_DIR=. python3 -m build --skip-dependency-check --no-isolation --wheel . +} + +package() { + python3 -m installer --destdir="$PKG_DEST" dist/*.whl + install -Dm755 main.py "$PKG_DEST/usr/share/weechat/python/weechat-matrix.py" + + for _script in matrix_decrypt matrix_sso_helper matrix_upload + do + install -Dm755 "contrib/$_script.py" "$PKG_DEST/usr/bin/$_script" + done +} + +postinstall () { +cat <<EOF +* +* To load this script, execute the following command in WeeChat: +* /script load weechat-matrix.py +* To load it automatically during WeeChat startup, use: +* $ mkdir -p ~/.local/share/weechat/python/autoload +* $ ln -s /usr/share/weechat/python/weechat-matrix.py -t ~/.local/share/weechat/python/autoload +* +EOF + +exit 0 +} |