n/ookla-speedtest added.

This is binary release of SpeedTest.net CLI from Ookla.

Speedtest CLI brings the trusted technology and global server network
behind Speedtest to the command line. With Speedtest CLI, you can easily
measure internet connection performance metrics like download, upload,
latency and packet loss.

URL: https://www.speedtest.net/apps/cli

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
Michal Cieslakiewicz 2021-05-15 12:39:53 +02:00
parent 8a6ca865a2
commit 6c90bd558b
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#!/bin/bash
SRC=ookla-speedtest
VERSION=1.0.0
set -x
wget -c https://install.speedtest.net/app/cli/${SRC}-${VERSION}-x86_64-linux.tgz

View File

@ -0,0 +1,51 @@
#!/bin/sh
# Set initial variables:
CWD=$(pwd)
APP=ookla-speedtest
VERSION=$(ls $APP-*.t?z | rev | cut -d- -f3 | rev)
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-1}
TAG=${TAG:-micu}
if [ "$TMP" = "" ]; then
TMP=/tmp
fi
PKG=$TMP/package-$APP
rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $APP-$VERSION
mkdir $APP-$VERSION || exit 1
cd $APP-$VERSION || exit 1
tar xzf $CWD/$APP-$VERSION-$ARCH-linux.t?z || exit 1
chown -R root.root .
mkdir -p $PKG/usr/bin $PKG/usr/man/man5 $PKG/usr/doc/$APP-$VERSION
cp -a speedtest $PKG/usr/bin
chmod -v 755 $PKG/usr/bin/speedtest
gzip -c9 speedtest.5 > $PKG/usr/man/man5/speedtest.5.gz
cp -a speedtest.md $PKG/usr/doc/$APP-$VERSION
chmod -v 644 $PKG/usr/man/man5/speedtest.5.gz $PKG/usr/doc/$APP-$VERSION/*
mkdir -p $PKG/install
[ -f $CWD/doinst.sh ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh
[ -f $CWD/doinst.sh.gz ] && zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
# Allow to run as non-root until now:
if [ $(id -u) -ne 0 ]; then
echo "*** Running as non-root, skipping makepkg."
echo "*** Package contents is in $PKG directory."
exit 0
fi
cd $PKG
makepkg -l y -c n $TMP/$APP-$VERSION-$ARCH-${BUILD}${TAG}.txz
# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$APP-$VERSION
rm -rf $PKG
fi

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------------------------------------------------------|
ookla-speedtest: ookla-speedtest (command line interface to Ookla Speedtest)
ookla-speedtest:
ookla-speedtest: Speedtest CLI brings the trusted technology and global server network
ookla-speedtest: behind Speedtest to the command line. With Speedtest CLI, you can
ookla-speedtest: easily measure internet connection performance metrics like
ookla-speedtest: download, upload, latency and packet loss.
ookla-speedtest:
ookla-speedtest: URL: https://www.speedtest.net/apps/cli
ookla-speedtest:
ookla-speedtest:
ookla-speedtest: