summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b25dc4506f21d955c8b65d1d4f33fec2b1e2de43 (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
# Maintainer: nobodyinperson <nobodyinperson at posteo de>
# Contributor: AlphaJack <alpha at tuta dot io>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>

pkgname="opentimestamps-client-git"
pkgver=0.7.2.r7.gcd71c76
pkgrel=1
pkgdesc="Command-line tool to create and validate timestamp proofs with the OpenTimestamps protocol"
license=("LGPL-3.0-or-later")
arch=("any")
provides=("opentimestamps-client")
conflicts=("opentimestamps-client")
url="https://github.com/opentimestamps/opentimestamps-client"
depends=(python-{opentimestamps,appdirs,gitpython,pysocks})
optdepends=("bitcoin-daemon: verify timestamps against a local Bitcoin node")
makedepends=("git" "python-build" "python-installer" "python-setuptools" "python-wheel")
source=("git+$url.git")
sha256sums=("SKIP")

pkgver(){
 cd "opentimestamps-client"
 git describe --long --tags | sed 's/^opentimestamps-client-v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare(){
 cd "opentimestamps-client"
 rm -rf build dist ./*.egg-info
}

build(){
 cd "opentimestamps-client"
 python -m build --wheel --no-isolation
}

check(){
 cd "opentimestamps-client"
 python -m unittest discover -v
}

package(){
 cd "opentimestamps-client"
 python -m installer --destdir="$pkgdir" dist/*.whl
 install -m755 ots-git-gpg-wrapper.sh -Dt "$pkgdir"/usr/bin
 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}