blob: 1e6bd0138601dabfd6642fb07c82e52df5c9e713 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer:
# Contributor: Ke Liu <spcter119@gmail.com>
_module="efb-wechat-slave"
_pkgname="python-$_module"
pkgname="$_pkgname-git"
pkgver=2.0.7.r2.g80dadf2
pkgrel=1
pkgdesc='EFB WeChat Slave, a channel for EH Forwarder Bot'
url='https://github.com/blueset/efb-wechat-slave'
license=('AGPL-3.0-or-later')
arch=('any')
depends=('python')
makedepends=(
'git'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
provides=("$_pkgname")
conflicts=("$_pkgname")
_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgsrc"
git describe --long --tags --exclude='*[a-zA-Z][a-zA-Z]*' \
| sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}
build() {
cd "$_pkgsrc"
python -m build --wheel --no-isolation
cd "build/lib/${_module//-/_}/locale/"
for _locale in [a-z][a-z]*; do
(cd "$_locale/LC_MESSAGES/"; msgfmt "${_module//-/_}.po" -o "${_module//-/_}.mo")
done
}
package() {
depends+=(
'bpython'
'ipython'
'python-cjkwrap'
'python-future'
'python-httplib2'
'python-magic'
'python-pillow'
'python-pyqrcode'
'python-requests'
'python-ruamel-yaml'
'python-typing_extensions'
'python-wxpython'
'python-yaml'
# AUR
'python-bullet'
'python-ehforwarderbot'
'python-itchat'
)
cd "$_pkgsrc"
python -m installer --destdir="$pkgdir" dist/*.whl
}
|