aboutsummaryrefslogtreecommitdiffstats
path: root/community/delve/APKBUILD
blob: 5a19e0e45e01b685daeca215d374f274ba57a8d7 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=delve
pkgver=1.20.2
pkgrel=6
pkgdesc="Debugger for the Go programming language"
url="https://github.com/go-delve/delve"
arch="x86 x86_64 aarch64"
license="MIT"
makedepends="go"
options="net chmod-clean"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/go-delve/delve/archive/refs/tags/v$pkgver.tar.gz"

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

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

check() {
	# TestGeneratedDoc and TestBuild require a proper $GOPATH setup.
	go test -run '!(^(TestGeneratedDoc|TestBuild)$)' ./cmd/dlv/...
}

package() {
	install -Dm755 bin/* -t "$pkgdir"/usr/bin/

	# Install additional documentation files.
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	cp -r Documentation/* "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
c48027d200257d0a979fbf2ea3a65f6dc645d1c231264023b10c216de1e3d80db86ac775cdb02f4dcd261756c8e26bbdce598cce709eb2aa4c9853f2e0cf6cf8  delve-1.20.2.tar.gz
"