system/percol: Added (dialog system).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-03-09 07:35:33 +07:00 committed by Willy Sudiarto Raharjo
parent 9da09c3c49
commit 9de959b523
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 113 additions and 0 deletions

18
system/percol/README Normal file
View File

@ -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.

View File

@ -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

10
system/percol/percol.info Normal file
View File

@ -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"

19
system/percol/slack-desc Normal file
View File

@ -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!).