network/gmi100: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
G. Galdini 2024-06-04 12:11:30 +07:00 committed by Willy Sudiarto Raharjo
parent 91e458d7b9
commit 7323f2fba2
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 28 additions and 29 deletions

View File

@ -1,9 +1,15 @@
.TH GMI100 1 "2024-03-03"
.TH GMI100 1 "03 June 2024"
.SH NAME
gmi100 \- Gemini CLI protocol client written in 100 lines of ANSI C.
.SH SYNOPSIS
.B gmi100
.IR [PAGER]
[\fI\,PAGER\/\fR]
.LP
.B gmi100>
[\fI\,ACTION\/\fR]
.SH DESCRIPTION
Other similar Gemini client projects written in few lines of code
successfully shows how simple Gemini protocol is. This code is far from
@ -35,29 +41,25 @@ Print current capsule URI
Quit
.TP
.BR "?"
Search, geminispace.info/search is used by default
Search \- geminispace.info/search is used by default
.TP
.BR "!"
Shell command prefixed, run it on current capsule
.
Shell command prefix \- run it on current capsule
.SH USAGE EXAMPLES
.
.TP
.BR "gmi100 cat"
.TP 3
\fB\,gmi100\/\fR \fI\,cat\/\fR
Using "cat" as pager
.TP
.BR "gmi100> ACTION"
On prompt: execute any action (as above mentioned)
.TP
.BR "gmi100> geminiprotocol.net"
.TP 3
\fB\,gmi100>\/\fR \fI\,geminiprotocol.net\/\fR
On prompt: go to capsule
.TP
.BR "gmi100> 3"
.TP 3
\fB\,gmi100>\/\fR \fI\,3\/\fR
On prompt: go to link number 3 of current capsule
.TP
.BR "gmi100> !nsxiv"
.TP 3
\fB\,gmi100>\/\fR \fI\,!nsxiv\/\fR
On prompt: open file of current URL with nsxiv (image)
.
.SH HISTORY
After you run the program it will open or create history .gmi100 file.
Then every page you visits that is not a redirection to other page and

View File

@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gmi100
VERSION=${VERSION:-20231020_f5c69e3}
COMMIT=f5c69e316781e8d411b46c1d901f3f9fc23f16cf
COMMIT="f5c69e316781e8d411b46c1d901f3f9fc23f16cf"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -50,19 +50,14 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
elif [ "$ARCH" = "aarch64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
@ -80,18 +75,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i 's/gcc/gcc $CFLAGS/' build
CFLAGS="$SLKCFLAGS" \
./build
mkdir -p $PKG/usr/{bin,man/man1}
cp $PRGNAM $PKG/usr/bin
cp $CWD/$PRGNAM.1 $PKG/usr/man/man1
install -m 755 -D $PRGNAM $PKG/usr/bin/$PRGNAM
install -m 644 -D $CWD/$PRGNAM.1 $PKG/usr/man/man1/$PRGNAM.1
strip --strip-unneeded $PKG/usr/bin/$PRGNAM
gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp README.md $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install