New package: termshark-1.0.0

including some patches already present in upstream's repo
This commit is contained in:
Piraty 2019-04-23 11:17:11 +02:00 committed by Helmut Pozimski
parent 2d7dd04db9
commit 17296acc11
3 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,27 @@
# reason: default to first interface if no args are given
# source: https://github.com/gcla/termshark/commit/99241799288932a26d92a9a72a69e01829906054
From 99241799288932a26d92a9a72a69e01829906054 Mon Sep 17 00:00:00 2001
From: Ross Jacobs <rj@swit.sh>
Date: Tue, 23 Apr 2019 22:34:20 +0100
Subject: [PATCH] Fixes #5, fixes #8
---
cmd/termshark/termshark.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmd/termshark/termshark.go b/cmd/termshark/termshark.go
index 16ed5d2..b268f5d 100644
--- cmd/termshark/termshark.go
+++ cmd/termshark/termshark.go
@@ -2230,6 +2230,10 @@ func cmain() int {
// argument is a pcap file e.g. termshark foo.pcap
if pcapf == "" && opts.Iface == "" {
pcapf = string(opts.Args.FilterOrFile)
+ // `termshark` => `termshark -i 1` (livecapture on default interface if no args)
+ if pcapf == "" {
+ opts.Iface = "1"
+ }
} else {
// Add it to filter args. Figure out later if they're capture or display.
filterArgs = append(filterArgs, opts.Args.FilterOrFile)

View file

@ -0,0 +1,41 @@
# reason: add MIT license (+1 commit after 1.0.0 release)
# source: https://github.com/gcla/termshark/commit/b0f047255ce8c9023dd4e9aa16276deaa79fce89
From b0f047255ce8c9023dd4e9aa16276deaa79fce89 Mon Sep 17 00:00:00 2001
From: Graham Clark <grclark@gmail.com>
Date: Mon, 22 Apr 2019 22:27:08 -0400
Subject: [PATCH] Fix the license - thanks to Andrew Benson for reporting this.
---
LICENSE | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b34611b
--- /dev/null
+++ LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Graham Clark
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

View file

@ -0,0 +1,23 @@
# Template file for 'termshark'
pkgname=termshark
version=1.0.0
revision=1
build_style=go
go_import_path="github.com/gcla/termshark"
go_package="${go_import_path}/cmd/termshark"
hostmakedepends="git"
depends="wireshark"
short_desc="Terminal UI for tshark, inspired by Wireshark"
maintainer="Piraty <piraty1@inbox.ru>"
license="MIT"
homepage="https://github.com/gcla/termshark"
distfiles="https://github.com/gcla/termshark/archive/v${version}.tar.gz"
checksum=669bba0e8dd7df54ade6321a5c7d2ec20563ffd777f7b3b0394a11f88da64698
# should be obsolete by next release, see:
# https://github.com/gcla/termshark/commit/cd358de177ba07c31a084ad4dbb3cf45aa6c7ffd
go_ldflags="-X github.com/gcla/termshark.Version=${version}"
post_install() {
vlicense LICENSE
}