mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
network/gemget-bin: Added (CLI for gemini protocol).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
c2dec60018
commit
a6f953749b
6 changed files with 224 additions and 0 deletions
12
network/gemget-bin/README
Normal file
12
network/gemget-bin/README
Normal file
|
@ -0,0 +1,12 @@
|
|||
gemget-bin (file downloader for gemini protocol)
|
||||
|
||||
gemget is a command line downloader for the Gemini protocol. It works
|
||||
well with streams and can print headers for debugging as well. It's
|
||||
basically the equivalent of wget, for gemini:// URLs.
|
||||
|
||||
Since this is a binary repack, only i586/i686, x86_64, and aarch64 are
|
||||
supported. For aarch64, download the file here:
|
||||
|
||||
https://github.com/makew0rld/gemget/releases/download/v1.9.0/gemget_1.9.0_linux_arm64
|
||||
|
||||
Its md5sum is a3e858cb4d08729bba30d8ade5e313cf.
|
21
network/gemget-bin/docs/LICENSE
Normal file
21
network/gemget-bin/docs/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 makeworld
|
||||
|
||||
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.
|
91
network/gemget-bin/docs/README.md
Normal file
91
network/gemget-bin/docs/README.md
Normal file
|
@ -0,0 +1,91 @@
|
|||
# gemget
|
||||
|
||||
A command line downloader for the [Gemini protocol](https://gemini.circumlunar.space/).
|
||||
It works well with streams and can print headers for debugging as well.
|
||||
|
||||
```
|
||||
gemget [option]... URL...
|
||||
|
||||
Usage of ./gemget:
|
||||
-e, --add-extension Add .gmi extensions to gemini files that don't have it, like directories.
|
||||
|
||||
--cert string Path to a PEM encoded TLS client certificate to be sent with the request.
|
||||
|
||||
--connect-timeout uint Max time allowed to form a connection and get the header, in seconds.
|
||||
Set to 0 for no timeout. (default 15)
|
||||
-d, --directory string
|
||||
The directory where downloads go (default ".")
|
||||
--header
|
||||
Print out (even with --quiet) the response header to stdout in the format:
|
||||
Header: <status> <meta>
|
||||
|
||||
-f, --input-file string Input file with a single URL on each line. Empty lines or lines starting
|
||||
with # are ignored. URLs on the command line will be processed first.
|
||||
|
||||
-i, --insecure Skip checking the cert
|
||||
|
||||
--key string Path to a PEM encoded TLS key for the provided client cert.
|
||||
|
||||
-m, --max-size string Set the file size limit. Any download that exceeds this size will
|
||||
cause an Info output and be deleted.
|
||||
Leaving it blank or setting to zero bytes will result in no limit.
|
||||
This flag is ignored when outputting to stdout.
|
||||
Format: <num> <optional-byte-size>
|
||||
Examples: 423, 3.2KiB, '2.5 MB', '22 MiB', '10gib', 3M
|
||||
|
||||
-t, --max-time uint Set the downloading time limit, in seconds. Any download that
|
||||
takes longer will cause an Info output and be deleted.
|
||||
|
||||
--no-progress-bar Disable the progress bar output.
|
||||
|
||||
-o, --output string Output path, for when there is only one URL.
|
||||
'-' means stdout and implies --quiet.
|
||||
It overrides --directory.
|
||||
|
||||
-p, --proxy string A proxy that can requests are sent to instead.
|
||||
Can be a domain or IP with port. Port 1965 is assumed otherwise.
|
||||
|
||||
-q, --quiet Neither info strings or the progress bar will be printed.
|
||||
Note that normally infos are printed to stderr, not stdout.
|
||||
|
||||
-r, --redirects uint How many redirects to follow before erroring out. (default 5)
|
||||
-s, --skip Move to the next URL when one fails.
|
||||
--socks string Host/address for a SOCKS5 proxy
|
||||
--socks-pass string Password for a SOCKS5 proxy (optional)
|
||||
--socks-user string Username for a SOCKS5 proxy (optional)
|
||||
|
||||
-v, --version Find out what version of gemget you're running.
|
||||
```
|
||||
|
||||
## Project Status
|
||||
|
||||
gemget is in maintenance mode. See my [blog post](https://www.makeworld.space/2023/08/bye_gemini.html) for details.
|
||||
|
||||
## Installation
|
||||
Install a binary of the most recent release from the [releases page](https://github.com/makeworld-the-better-one/gemget/releases/). On Unix-based systems you will have to make the file executable with `chmod +x <filename>`. You can rename the file to just `gemget` for easy access, and move it to `/usr/local/bin/`.
|
||||
|
||||
If you have Go installed, you can also install it using the Makefile. Make sure to use GNU Make.
|
||||
|
||||
```shell
|
||||
git clone https://github.com/makeworld-the-better-one/gemget
|
||||
cd gemget
|
||||
# git checkout v1.2.3 # Optionally pin to a specific version instead of the latest commit
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## Arch Linux
|
||||
|
||||
Arch Linux users can install gemget from AUR. It has the package name `gemget`, and is maintained by @dalz.
|
||||
|
||||
```shell
|
||||
yay -S gemget
|
||||
```
|
||||
|
||||
|
||||
## Features to add
|
||||
- [x] Support client certificates
|
||||
- [ ] Support interactive input for status code 10 & 11
|
||||
|
||||
## License
|
||||
This project is under the [MIT License](./LICENSE).
|
71
network/gemget-bin/gemget-bin.SlackBuild
Normal file
71
network/gemget-bin/gemget-bin.SlackBuild
Normal file
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for gemget-bin
|
||||
|
||||
# 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=gemget-bin
|
||||
SRCNAM=gemget
|
||||
VERSION=${VERSION:-1.9.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
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}
|
||||
|
||||
EXE=""
|
||||
case "$ARCH" in
|
||||
i?86) EXE=${SRCNAM}_${VERSION}_linux_32-bit ;;
|
||||
x86_64) EXE=${SRCNAM}_${VERSION}_linux_64-bit ;;
|
||||
aarch64) EXE=${SRCNAM}_${VERSION}_linux_arm64 ;;
|
||||
esac
|
||||
|
||||
if [ "$EXE" = "" ]; then
|
||||
cat <<EOF
|
||||
===================================================
|
||||
Sorry, ARCH="$ARCH" is not supported.
|
||||
Only i586, i686, x86_64, and aarch64 are supported.
|
||||
===================================================
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $PKG
|
||||
install -D -m0755 -oroot -groot $CWD/$EXE usr/bin/$SRCNAM
|
||||
|
||||
# the binary includes no docs. so they're included with the SlackBuild
|
||||
# (taken from the git repo at https://github.com/makew0rld/gemget).
|
||||
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
mkdir -p $PKGDOC
|
||||
install -m0644 -oroot -groot $CWD/docs/* $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
network/gemget-bin/gemget-bin.info
Normal file
10
network/gemget-bin/gemget-bin.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="gemget-bin"
|
||||
VERSION="1.9.0"
|
||||
HOMEPAGE="https://github.com/makew0rld/gemget/"
|
||||
DOWNLOAD="https://github.com/makew0rld/gemget/releases/download/v1.9.0/gemget_1.9.0_linux_32-bit"
|
||||
MD5SUM="6e5d9c6d38abee20ad4dccedafe978a7"
|
||||
DOWNLOAD_x86_64="https://github.com/makew0rld/gemget/releases/download/v1.9.0/gemget_1.9.0_linux_64-bit"
|
||||
MD5SUM_x86_64="d0bfc8118c379c4dfaf6872ff32eef3a"
|
||||
REQUIRES=""
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
19
network/gemget-bin/slack-desc
Normal file
19
network/gemget-bin/slack-desc
Normal 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------------------------------------------------------|
|
||||
gemget-bin: gemget-bin (file downloader for gemini protocol)
|
||||
gemget-bin:
|
||||
gemget-bin: gemget is a command line downloader for the Gemini protocol. It works
|
||||
gemget-bin: well with streams and can print headers for debugging as well. It's
|
||||
gemget-bin: basically the equivalent of wget, for gemini:// URLs.
|
||||
gemget-bin:
|
||||
gemget-bin:
|
||||
gemget-bin:
|
||||
gemget-bin:
|
||||
gemget-bin:
|
||||
gemget-bin:
|
Loading…
Reference in a new issue