pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/prettyping



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Wed Dec 22 16:16:30 UTC 2021

Added Files:
        pkgsrc/net/prettyping: DESCR Makefile PLIST distinfo
        pkgsrc/net/prettyping/patches: patch-prettyping

Log Message:
Add prettyping, a wrapper to colorize and simplify ping's output.

`prettyping` runs the standard `ping` in the background and parses its
output, showing the ping responses in a *graphical* way at the terminal
(by using colors and Unicode characters).

`prettyping` is written in `bash` and `awk`, and is reported to work on
many different systems and different versions of `awk`.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/prettyping/DESCR \
    pkgsrc/net/prettyping/Makefile pkgsrc/net/prettyping/PLIST \
    pkgsrc/net/prettyping/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/prettyping/patches/patch-prettyping

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/net/prettyping/DESCR
diff -u /dev/null pkgsrc/net/prettyping/DESCR:1.1
--- /dev/null   Wed Dec 22 16:16:30 2021
+++ pkgsrc/net/prettyping/DESCR Wed Dec 22 16:16:29 2021
@@ -0,0 +1,10 @@
+`prettyping` is a wrapper around the standard `ping` tool with the
+objective of making the output prettier, more colorful, more compact,
+and easier to read.
+
+`prettyping` runs the standard `ping` in the background and parses its
+output, showing the ping responses in a *graphical* way at the terminal
+(by using colors and Unicode characters).
+
+`prettyping` is written in `bash` and `awk`, and is reported to work on
+many different systems and different versions of `awk`.
Index: pkgsrc/net/prettyping/Makefile
diff -u /dev/null pkgsrc/net/prettyping/Makefile:1.1
--- /dev/null   Wed Dec 22 16:16:30 2021
+++ pkgsrc/net/prettyping/Makefile      Wed Dec 22 16:16:29 2021
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2021/12/22 16:16:29 schmonz Exp $
+
+GITHUB_TAG=            refs/tags/v${PKGVERSION_NOREV}
+DISTNAME=              prettyping-1.0.1
+CATEGORIES=            net
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=denilsonsa/}
+
+MAINTAINER=            schmonz%NetBSD.org@localhost
+HOMEPAGE=              https://github.com/denilsonsa/prettyping/
+COMMENT=               Wrapper to colorize and simplify ping's output
+LICENSE=               mit
+
+WRKSRC=                        ${WRKDIR}/${DISTNAME}
+
+USE_LANGUAGES=         # none
+NO_BUILD=              yes
+
+USE_TOOLS+=            bash:run
+REPLACE_INTERPRETER+=  bash
+REPLACE.bash.old=      /usr/bin/env bash
+REPLACE.bash.new=      ${BASH}
+REPLACE_FILES.bash=    ${PKGBASE}
+
+INSTALLATION_DIRS=     bin
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/bin
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/prettyping/PLIST
diff -u /dev/null pkgsrc/net/prettyping/PLIST:1.1
--- /dev/null   Wed Dec 22 16:16:30 2021
+++ pkgsrc/net/prettyping/PLIST Wed Dec 22 16:16:29 2021
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/12/22 16:16:29 schmonz Exp $
+bin/prettyping
Index: pkgsrc/net/prettyping/distinfo
diff -u /dev/null pkgsrc/net/prettyping/distinfo:1.1
--- /dev/null   Wed Dec 22 16:16:30 2021
+++ pkgsrc/net/prettyping/distinfo      Wed Dec 22 16:16:29 2021
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2021/12/22 16:16:29 schmonz Exp $
+
+BLAKE2s (prettyping-1.0.1.tar.gz) = 0bb8630087e703943d0d0c42b3b2b997bee0749a4a8cf5a3b30df3f4906dfb8b
+SHA512 (prettyping-1.0.1.tar.gz) = 967626f11cd58fd9a0ce91a320caf6b6a296681ed809e04188f0cfe00d03c80a3620bf4d3ec86e855be363810763ff3ccd8bb0a959d03e62b31edba2cfae7f79
+Size (prettyping-1.0.1.tar.gz) = 10104 bytes
+SHA1 (patch-prettyping) = 1ebd90dd1a7691eb02b64f789ee472c61d82a2ee

Index: pkgsrc/net/prettyping/patches/patch-prettyping
diff -u /dev/null pkgsrc/net/prettyping/patches/patch-prettyping:1.1
--- /dev/null   Wed Dec 22 16:16:30 2021
+++ pkgsrc/net/prettyping/patches/patch-prettyping      Wed Dec 22 16:16:29 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-prettyping,v 1.1 2021/12/22 16:16:29 schmonz Exp $
+
+Borrow IPv6 fixes for BSD and macOS from Homebrew.
+
+--- prettyping.orig    2017-04-03 07:49:23.000000000 +0000
++++ prettyping
+@@ -742,7 +742,7 @@ BEGIN {
+ ############################################################
+ # Main loop
+ {
+-      if ( $0 ~ /^[0-9]+ bytes from .*: icmp_[rs]eq=[0-9]+ ttl=[0-9]+ time=[0-9.]+ *ms/ ) {
++      if ( $0 ~ /^[0-9]+ bytes from .*[:,] icmp_[rs]eq=[0-9]+ (ttl|hlim)=[0-9]+ time=[0-9.]+ *ms/ ) {
+               # Sample line from ping:
+               # 64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=184 ms
+               if ( other_line_times >= 2 ) {
+@@ -751,7 +751,7 @@ BEGIN {
+ 
+               # $1 = useless prefix string
+               # $2 = icmp_seq
+-              # $3 = ttl
++              # $3 = ttl/hlim
+               # $4 = time
+ 
+               # This must be called before incrementing the last_seq variable!



Home | Main Index | Thread Index | Old Index