diff options
author | B. Watson <urchlay@slackware.uk> | 2024-03-09 07:35:33 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-03-09 08:01:31 +0700 |
commit | 9de959b5235556e31e75f76efe90d67918450365 (patch) | |
tree | bbd4c06ab9f4766919113394312ac92ff9085dd6 | |
parent | 9da09c3c49b7746d6988adf07e304e32292db5ac (diff) |
system/percol: Added (dialog system).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/percol/README | 18 | ||||
-rw-r--r-- | system/percol/percol.SlackBuild | 66 | ||||
-rw-r--r-- | system/percol/percol.info | 10 | ||||
-rw-r--r-- | system/percol/slack-desc | 19 |
4 files changed, 113 insertions, 0 deletions
diff --git a/system/percol/README b/system/percol/README new file mode 100644 index 0000000000000..dc01b664539ef --- /dev/null +++ b/system/percol/README @@ -0,0 +1,18 @@ +percol (interactive selection for UNIX pipes) + +An interactive grep tool in your terminal. Percol does the following: + +1. receives input lines from stdin or a file, 2. lists the input +lines, 3. waits for your input that filters/selects the line(s), +4. and finally outputs the selected line(s) to stdout. + +Since percol just filters the input and outputs the result to +stdout, it can be used in command-chains with | in your shell (UNIX +philosophy!). + +Package includes command completion for zsh, plus a /etc/percol.zsh +script that adds extra functionality (see the comments at the top of +the script for instructions on using it). + +There is no man page; run "percol --help" for a list of options, and +read /usr/doc/percol-$VERSION/README.md for key bindings and examples. diff --git a/system/percol/percol.SlackBuild b/system/percol/percol.SlackBuild new file mode 100644 index 0000000000000..d6ece702efe1c --- /dev/null +++ b/system/percol/percol.SlackBuild @@ -0,0 +1,66 @@ +#!/bin/bash + +# Slackware build script for percol + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=percol +VERSION=${VERSION:-0.2.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +# No native code here, no need for CFLAGS. Sadly, this can't be NOARCH +# because it keeps python modules in /usr/lib(64)?/python3.9/... + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# this actually works with either python2 or 3, better to use 3. +python3 setup.py install --root=$PKG + +# include zsh completion and script in package +mkdir -p $PKG/usr/share/zsh/site-functions/ $PKG/etc +cp -a tools/zsh/_percol $PKG/usr/share/zsh/site-functions/ +cat tools/zsh/percol.zsh > $PKG/etc/percol.zsh + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a README* $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/percol/percol.info b/system/percol/percol.info new file mode 100644 index 0000000000000..0e758384ef4f5 --- /dev/null +++ b/system/percol/percol.info @@ -0,0 +1,10 @@ +PRGNAM="percol" +VERSION="0.2.1" +HOMEPAGE="https://github.com/mooz/percol/" +DOWNLOAD="https://github.com/mooz/percol/archive/v0.2.1/percol-0.2.1.tar.gz" +MD5SUM="b00f9c6cce4e8596d50db5ae28f2510a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/percol/slack-desc b/system/percol/slack-desc new file mode 100644 index 0000000000000..8895b04d21c71 --- /dev/null +++ b/system/percol/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +percol: percol (interactive selection for UNIX pipes) +percol: +percol: An interactive grep tool in your terminal. Percol does the following: +percol: +percol: 1. receives input lines from stdin or a file, 2. lists the input +percol: lines, 3. waits for your input that filters/selects the line(s), +percol: 4. and finally outputs the selected line(s) to stdout. +percol: +percol: Since percol just filters the input and outputs the result to +percol: stdout, it can be used in command-chains with | in your shell (UNIX +percol: philosophy!). |