summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11a16d0d052c85fd75d8ce3a64e23df04637b644 (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
# Maintainer: Mario Finelli <mario at finel dot li>

_pkgname=backblaze-b2
_reponame="B2_Command_Line_Tool"

pkgname="${_pkgname}-git"
pkgver=r1123.15a60ad
pkgrel=1
pkgdesc="Backblaze B2 Command Line Client."
arch=('any')
url="https://www.backblaze.com/b2/cloud-storage.html"
license=('MIT')
depends=('python2'
         'python2-arrow'
         'python2-futures'
         'python2-logfury'
         'python2-requests'
         'python2-six'
         'python2-tqdm')
makedepends=('git'
             'python2-setuptools')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git://github.com/Backblaze/$_reponame.git")
md5sums=('SKIP')

pkgver() {
    cd "$srcdir/$_reponame"
    printf "r%s.%s" "$(git rev-list --count HEAD)" \
        "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/$_reponame"
    python2 setup.py build
}

package() {
    cd "$srcdir/$_reponame"
    python2 setup.py install --root="$pkgdir" --optimize=1

    rm -rf "$pkgdir"/usr/lib/python*/site-packages/test

    install -Dm0644 contrib/bash_completion/b2 \
        "$pkgdir/etc/bash_completion.d/b2"
    install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}