diff options
author | Slashbunny | 2020-03-29 22:31:25 -0400 |
---|---|---|
committer | Slashbunny | 2020-03-29 22:31:25 -0400 |
commit | d82306d2dd3d7713f087dd2ea2b2740274d3ed7b (patch) | |
tree | 4140af1c5ac940c9733cbdfab63476dd4580dd0b | |
parent | 4a80c00f189a1877884b83892b2567668d81fc1d (diff) | |
download | aur-weechat-poljar-matrix-git.tar.gz |
Misc changes to put package in sync with version in community
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | weechat-poljar-matrix-git.install | 13 |
3 files changed, 53 insertions, 41 deletions
@@ -1,25 +1,30 @@ pkgbase = weechat-poljar-matrix-git - pkgdesc = Python plugin for Weechat to communicate over the Matrix protocol - pkgver = r701.6d58ff0 + pkgdesc = Weechat Matrix protocol script written in Python + pkgver = r717.2a24096 pkgrel = 1 url = https://github.com/poljar/weechat-matrix install = weechat-poljar-matrix-git.install arch = any - license = custom + license = ISC + checkdepends = python-hypothesis + checkdepends = python-pytest makedepends = git - depends = python-aiohttp depends = python-atomicwrites depends = python-attrs depends = python-future depends = python-logbook - depends = python-nio + depends = python-matrix-nio depends = python-pygments depends = python-pyopenssl depends = python-webcolors - provides = weechat-poljar-matrix - conflicts = weechat-poljar-matrix - source = weechat-matrix::git+https://github.com/poljar/weechat-matrix.git - md5sums = SKIP + optdepends = python-aiohttp: matrix_sso_helper support + optdepends = python-magic: matrix_upload support + optdepends = python-requests: matrix_decrypt and matrix_upload support + optdepends = ranger: default plumber for matrix_decrypt + provides = weechat-matrix + conflicts = weechat-matrix + source = git+https://github.com/poljar/weechat-matrix.git + sha512sums = SKIP pkgname = weechat-poljar-matrix-git @@ -1,40 +1,54 @@ # Maintainer: Slash <youremail@domain.com> pkgname=weechat-poljar-matrix-git -pkgver=r701.6d58ff0 +#_pkgname=${pkgname%-git} +_pkgname='weechat-matrix' +pkgver=r717.2a24096 pkgrel=1 -pkgdesc="Python plugin for Weechat to communicate over the Matrix protocol" +pkgdesc='Weechat Matrix protocol script written in Python' arch=('any') url="https://github.com/poljar/weechat-matrix" -license=('custom') -groups=() -depends=('python-aiohttp' 'python-atomicwrites' 'python-attrs' 'python-future' 'python-logbook' - 'python-nio' 'python-pygments' 'python-pyopenssl' 'python-webcolors') +license=('ISC') +depends=('python-atomicwrites' 'python-attrs' 'python-future' 'python-logbook' + 'python-matrix-nio' 'python-pygments' 'python-pyopenssl' 'python-webcolors') makedepends=('git') -provides=('weechat-poljar-matrix') -conflicts=('weechat-poljar-matrix') -install='weechat-poljar-matrix-git.install' -source=('weechat-matrix::git+https://github.com/poljar/weechat-matrix.git') -md5sums=('SKIP') +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') +provides=("${_pkgname}") +conflicts=("${_pkgname}") +install="${pkgname}.install" +source=("git+${url}.git") +sha512sums=('SKIP') pkgver() { - cd "${srcdir}/weechat-matrix" + cd "${_pkgname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } +prepare() { + cd "${_pkgname}" + sed -ri 's|#!/usr/bin/env( -S)? python3|#!/usr/bin/python3|' contrib/*.py +} + +check() { + cd "${_pkgname}" + python -m pytest +} + package() { - cd "${srcdir}/weechat-matrix" + cd "${_pkgname}" - # Install plugin scripts - make WEECHAT_HOME="${pkgdir}/usr/lib/weechat" install + make DESTDIR="${pkgdir}" PREFIX=/usr/share/weechat install - # Install contrib scripts - for script in contrib/*; do - install -D -m 755 "${script}" \ - "${pkgdir}/usr/lib/weechat/python/matrix/${script}" - done; + for _script in matrix_decrypt matrix_sso_helper matrix_upload + do + install -Dm755 "contrib/${_script}.py" \ + "${pkgdir}/usr/bin/${_script}" + done - # Install License - install -D -m 644 'LICENSE' \ + install -Dm644 'LICENSE' \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/weechat-poljar-matrix-git.install b/weechat-poljar-matrix-git.install index 4222419bd125..f81f16a782d3 100644 --- a/weechat-poljar-matrix-git.install +++ b/weechat-poljar-matrix-git.install @@ -1,18 +1,11 @@ _install_update_msg() { - echo "In order to use this plugin after installation, you'll need to run the following commands as the user that is running weechat:" + echo "In order to use this plugin after installation, you'll need to run the following command as the user running weechat:" echo "" - echo " $ ln -s /usr/lib/weechat/python/matrix/ ~/.weechat/python/" - echo " $ ln -s /usr/lib/weechat/python/matrix.py ~/.weechat/python/" + echo " $ ln -s /usr/share/weechat/python/{matrix,matrix.py} -t ~/.weechat/python" echo "" echo "If you want the script to be loaded on start-up, you'll also need to symlink it into the autoload folder:" echo "" - echo " $ ln -s /usr/lib/weechat/python/matrix.py ~/.weechat/python/autoload/" - echo "" - echo "Optional scripts, like matrix_decrypt, matrix_sso_helper, and matrix_upload are available in the following directory:" - echo "" - echo " /usr/lib/weechat/python/matrix/contrib/" - echo "" - echo " Symlink these files or add this directory to your \$PATH to use these scripts." + echo " $ ln -s /usr/share/weechat/python/matrix.py ~/.weechat/python/autoload/" echo "" } |