[arch-commits] Commit in (5 files)

Jonas Witschel diabonas at archlinux.org
Sun Mar 29 23:27:42 UTC 2020


    Date: Sunday, March 29, 2020 @ 23:27:42
  Author: diabonas
Revision: 606647

Initial import of weechat-matrix

Added:
  weechat-matrix/
  weechat-matrix/repos/
  weechat-matrix/trunk/
  weechat-matrix/trunk/PKGBUILD
  weechat-matrix/trunk/weechat-matrix.install

------------------------+
 PKGBUILD               |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 weechat-matrix.install |    4 ++++
 2 files changed, 50 insertions(+)

Added: weechat-matrix/trunk/PKGBUILD
===================================================================
--- weechat-matrix/trunk/PKGBUILD	                        (rev 0)
+++ weechat-matrix/trunk/PKGBUILD	2020-03-29 23:27:42 UTC (rev 606647)
@@ -0,0 +1,46 @@
+# Maintainer: Jonas Witschel <diabonas at archlinux.org>
+pkgname=weechat-matrix
+pkgver=0.1.0
+_tag=f0249bd923607220508386aefb2cb2507e11669e # git show-ref "$pkgver"
+pkgrel=1
+pkgdesc='Weechat Matrix protocol script written in Python'
+arch=('any')
+url='https://github.com/poljar/weechat-matrix'
+license=('ISC')
+depends=('python-atomicwrites' 'python-attrs' 'python-future' 'python-logbook' 'python-matrix-nio'
+         'python-pygments' 'python-pyopenssl' 'python-webcolors')
+makedepends=('git')
+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'
+            'ranger: default plumber for matrix_decrypt')
+install='weechat-matrix.install'
+source=("git+$url.git?signed#tag=$_tag")
+sha512sums=('SKIP')
+validpgpkeys=('689A3B5BC6560AB4C99A2A0581314DA807EF4E22') # Damir Jelić (poljar) <poljar at termina.org.uk>
+
+pkgver() {
+	cd "$pkgname"
+	git describe | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+prepare() {
+	cd "$pkgname"
+	sed -ri 's|#!/usr/bin/env( -S)? python3|#!/usr/bin/python3|' contrib/*.py
+}
+
+check() {
+	cd "$pkgname"
+	python -m pytest
+}
+
+package() {
+	cd "$pkgname"
+	make DESTDIR="$pkgdir" PREFIX=/usr/share/weechat install
+	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"
+}

Added: weechat-matrix/trunk/weechat-matrix.install
===================================================================
--- weechat-matrix/trunk/weechat-matrix.install	                        (rev 0)
+++ weechat-matrix/trunk/weechat-matrix.install	2020-03-29 23:27:42 UTC (rev 606647)
@@ -0,0 +1,4 @@
+post_install() {
+	echo "To add this script to your WeeChat installation, please execute the following command:"
+	echo "ln -s /usr/share/weechat/python/{matrix,matrix.py} -t ~/.weechat/python"
+}



More information about the arch-commits mailing list