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

pkgname=backblaze-b2-git
pkgver=r257.a132718
pkgrel=1
pkgdesc="Backblaze B2 Command Line Client."
arch=('any')
url="https://www.backblaze.com/b2/cloud-storage.html"
license=('MIT')
depends=('python2')
makedepends=('git')
optdepends=('python-tqdm: upload/download progress bar')
provides=('backblaze-b2')
conflicts=('backblaze-b2')
source=('git://github.com/Backblaze/B2_Command_Line_Tool.git')
md5sums=('SKIP')

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

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

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

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