summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlashbunny2020-04-18 17:38:42 -0400
committerSlashbunny2020-04-18 17:38:42 -0400
commit2111f524f93e4db0ba8e23a02d16e191b7bde22a (patch)
tree6ffc5fd2074363e2a4eeba6ed1e71998b0d7444b
parent0e63d482c930a84400f2eeb9c48878782c6f2cf3 (diff)
downloadaur-2111f524f93e4db0ba8e23a02d16e191b7bde22a.tar.gz
Change installation method to match [community] package
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD19
-rw-r--r--weechat-matrix-git.install9
3 files changed, 23 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a25a959a4130..37d6799bd1e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = weechat-matrix-git
pkgdesc = Weechat Matrix protocol script written in Python
- pkgver = r717.2a24096
+ pkgver = r723.d415841
pkgrel = 1
url = https://github.com/poljar/weechat-matrix
install = weechat-matrix-git.install
@@ -9,6 +9,7 @@ pkgbase = weechat-matrix-git
checkdepends = python-hypothesis
checkdepends = python-pytest
makedepends = git
+ makedepends = python-dephell
depends = python-atomicwrites
depends = python-attrs
depends = python-future
diff --git a/PKGBUILD b/PKGBUILD
index 13f1c7e04485..edde4f347954 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,15 +2,15 @@
pkgname=weechat-matrix-git
_pkgname=${pkgname%-git}
-pkgver=r717.2a24096
+pkgver=r723.d415841
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')
+depends=('python-atomicwrites' 'python-attrs' 'python-future' 'python-logbook' 'python-matrix-nio'
+ 'python-pygments' 'python-pyopenssl' 'python-webcolors')
+makedepends=('git' 'python-dephell')
checkdepends=('python-hypothesis' 'python-pytest')
optdepends=('python-aiohttp: matrix_sso_helper support'
'python-magic: matrix_upload support'
@@ -31,6 +31,12 @@ pkgver() {
prepare() {
cd "${_pkgname}"
sed -ri 's|#!/usr/bin/env( -S)? python3|#!/usr/bin/python3|' contrib/*.py
+ dephell deps convert --from pyproject.toml --to setup.py
+}
+
+build() {
+ cd "${_pkgname}"
+ python setup.py build
}
check() {
@@ -41,7 +47,10 @@ check() {
package() {
cd "${_pkgname}"
- make DESTDIR="${pkgdir}" PREFIX=/usr/share/weechat install
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+
+ install -Dm755 main.py \
+ "${pkgdir}/usr/share/weechat/python/weechat-matrix.py"
for _script in matrix_decrypt matrix_sso_helper matrix_upload
do
diff --git a/weechat-matrix-git.install b/weechat-matrix-git.install
index f81f16a782d3..61d5d3e69b33 100644
--- a/weechat-matrix-git.install
+++ b/weechat-matrix-git.install
@@ -1,11 +1,16 @@
_install_update_msg() {
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/share/weechat/python/{matrix,matrix.py} -t ~/.weechat/python"
+ echo " $ ln -s /usr/share/weechat/python/weechat-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/share/weechat/python/matrix.py ~/.weechat/python/autoload/"
+ echo " $ ln -s /usr/share/weechat/python/weechat-matrix.py -t ~/.weechat/python/autoload/"
+ echo ""
+ echo "The location of the script has changed in April 2020, remove your old symlinks and follow the instructions above:"
+ echo ""
+ echo " $ rm ~/.weechat/python/{matrix,matrix.py}"
+ echo " $ rm ~/.weechat/python/autoload/matrix.py"
echo ""
}