aboutsummaryrefslogtreecommitdiffstats
path: root/community/termshark/APKBUILD
blob: 4ec536716b0554e50c26aec1cc09727573e383df (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: omni <omni@gitlab.alpinelinux.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=termshark
pkgver=2.4.0
pkgrel=2
pkgdesc="terminal UI for tshark, inspired by Wireshark"
url="https://termshark.io"
license="MIT"
arch="all !armhf" # no tshark on armhf
depends="tshark"
makedepends="go"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/gcla/termshark/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"

build() {
	go build -v ./cmd/...
}

check() {
	go test -v ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 docs/UserGuide.md -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname

	# Help clean-up as some paths are readonly
	rm -rf "$GOPATH"/pkg/mod
}

sha512sums="
378bb67ff50a8dfa80f614540371f326627e73bdf63bceb183ed73afbbf9dead4e0597fb969ba49c4ee3d3de00ac7bb91166421c19c788df47ff8d9fcbc5b9fc  termshark-2.4.0.tar.gz
"