blob: 83579de79bd9cd3e0c846cf78012433ed8e71a31 (
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
|
# Maintainer: Evgeniy Filimonov <evgfilim1@gmail.com>
pkgname=('python-telegram-bot-git')
epoch=1
pkgver=12.1.1.r0.e60a4201
pkgrel=1
pkgdesc="A Python wrapper around the Telegram Bot API"
arch=('any')
url="https://github.com/${pkgname%-git}/${pkgname%-git}"
license=('LGPL3')
depends=('python-future>=0.16.0' 'python-certifi' 'python-tornado>=5.1' 'python-cryptography')
makedepends=('git' 'python-setuptools')
optdepends=('python-pysocks: SOCKS or HTTP proxy'
'python-ujson: Ultra fast JSON parsing')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
changelog='CHANGES.rst'
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')
prepare() {
msg2 "Updating dependencies..."
cd "$srcdir/$pkgname"
git submodule update --init --recursive
msg2 "Updating changelog..."
cp ./CHANGES.rst ../../
}
pkgver() {
cd "$srcdir/$pkgname"
printf "%s.r%s.%s" "$(python -c 'import telegram; print(telegram.__version__)')" \
"$(git rev-list --count $(git log --oneline | grep Bump | head -n1 | awk '{print $1}')..HEAD)" "$(git rev-parse --short HEAD)"
# printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
cd "$srcdir/$pkgname"
python setup.py build
}
package() {
cd "$srcdir/$pkgname"
python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
}
# vim: ft=sh ts=4 sw=4 et
|