As of Go 1.17, termshark can't be installed in a single go get/go
install command because termshark uses replace directives in its
go.mod
$ go install github.com/gcla/termshark/v2/cmd/termshark@latest
go install: github.com/gcla/termshark/v2/cmd/termshark@latest (in github.com/gcla/termshark/v2@v2.3.0):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
This is discussed here: https://github.com/golang/go/issues/40276
Longer-term, I need to remove these directives, or wait for a Go
release that makes it possible to use them with go install. Even though
termux may not yet be using Go 1.17, I decided to git-clone and build
inside the source directory instead.
Termshark is a terminal UI for tshark. It's written in golang and as such
consists of one binary. This is a minimal termux build script to make
termshark available.
I originally made this PR at termux-packages -
https://github.com/termux/termux-packages/pull/3931 - but the recommendation
from that discussion was to submit against root packages instead. Termshark
needs tshark at runtime, and tshark could come from either
x11-repo:wireshark-gtk or root-repo:tshark.
More info on termshark is available at https://github.com/gcla/termshark.