aboutsummaryrefslogtreecommitdiffstats
path: root/testing/btcd/APKBUILD
blob: fa857dae68846622da838f1cc8fe83af0ee30356 (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
# Maintainer: Michał Adamski <michal@ert.pl>
pkgname=btcd
pkgver=0.23.4
_pkgver=${pkgver/_/-}
pkgrel=5
pkgdesc="Alternative full node bitcoin implementation written in Go"
url="https://github.com/btcsuite/btcd#btcd"
arch="all"
license="ISC"
makedepends="go"
source="https://github.com/btcsuite/btcd/archive/v$_pkgver/btcd-$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"

# secfixes:
#   0.23.3-r0:
#     - CVE-2022-39389

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	mkdir bin
	go build -trimpath -v -o bin . ./cmd/...
}

check() {
	export GOFLAGS="${GOFLAGS/-trimpath/}"
	go test ./...
}

package() {
	for bin in bin/*; do
		install -Dm755 $bin "$pkgdir"/usr/$bin
	done
}
sha512sums="
aa6c40d58d8d4e7302005fa80b192a8f0298707d67685273e2b57cc339f2a999ea1953215f1a89c0480ea926dc6a55740c243656b67ca3b9d494b05f06537880  btcd-0.23.4.tar.gz
"