aboutsummaryrefslogtreecommitdiffstats
path: root/testing/delve/APKBUILD
blob: 5911d446313c924a51cbd1af00ee2c68db3344a4 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=delve
pkgver=1.7.2
pkgrel=0
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 GOPATH="$srcdir"

build() {
	mkdir bin
	go build -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="
2d070e51732df10d8f8c05e4cc26ce43ea1ea4085b5c0b7343420838c7de89e8990a2c7320e8dc54c5780b68a9527ebfd5c4ae225e71abb06406b2a7d6f3bc5a  delve-1.7.2.tar.gz
"