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 /PKGBUILD | |
parent | 4a80c00f189a1877884b83892b2567668d81fc1d (diff) | |
download | aur-weechat-poljar-matrix-git.tar.gz |
Misc changes to put package in sync with version in community
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 36 insertions, 22 deletions
@@ -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" } |