summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38e6ecbcccb1060b58a14321bd76936a40944a8b (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
# Maintainer: KUMAX <kumax2048@pm.me>

_name=ItChat-UOS
pkgname=python-itchat-uos-git
pkgrel=1
pkgver=r202.ff4ad96
pkgdesc="A complete and graceful API for Wechat."
url=https://pypi.org/project/itchat-uos
arch=("any")
license=("MIT")
provides=("python-itchat")
depends=('python-requests' 'python-pyqrcode' 'python-pypng')
source=('git+https://github.com/why2lyj/ItChat-UOS.git')
conflicts=("python-itchat" "python-itchat-git" "python-itchat-uos")
# https://github.com/why2lyj/ItChat-UOS/commit/2f141acc3e780fe516516ea74d82c0d5c8a9ffce.patch
sha256sums=('SKIP')
makedepends=('python-setuptools' 'git')

pkgver() {
    cd ${_name}
    ( set -o pipefail
            git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
            printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )	
}

build() {
	cd ${srcdir}/${_name}
	python setup.py clean --all
    python setup.py build
}

package() {
	cd ${srcdir}/${_name}
    python setup.py install --root="$pkgdir" --optimize=1
}