summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e1da7528cbcd410c8756af30e8e0cb12202c1e2c (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
# Maintainer: David HrabÄ› <david.hrabe12@seznam.cz>
pkgname=awscurl-git
pkgver=0.42.r0.g89c74fa
pkgrel=1
pkgdesc="Curl-like tool with AWS Signature Version 4 request signing"
arch=('any')
url="https://github.com/okigan/awscurl"
license=('MIT')
depends=(
    'python'
    'python-awscrt'
    'python-boto3'
    'python-botocore'
    'python-configargparse'
    'python-requests'
    'python-urllib3'
)
makedepends=(
    'git'
    'python-build'
    'python-installer'
    'python-setuptools'
    'python-wheel'
)
checkdepends=(
    'python-pytest'
)
provides=('awscurl')
conflicts=('awscurl')
options=('!debug')
source=("${pkgname}::git+https://github.com/okigan/awscurl.git")
b2sums=('SKIP')

pkgver() {
    cd "${pkgname}"
    git describe --long --tags --abbrev=7 2>/dev/null \
        | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \
        || printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
    cd "${pkgname}"
    python -m build --wheel --no-isolation
}

check() {
    cd "${pkgname}"
    pytest
}

package() {
    cd "${pkgname}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/awscurl/README.md"
}