diff options
author | Andrzej Telszewski <andrzej@telszewski.com> | 2024-01-30 08:21:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-01-30 08:52:18 +0700 |
commit | 80e8434217e62c2e337556bf64cab0b30795e20b (patch) | |
tree | 2399d9cc44d691b928c6279085d269ffe69f1e49 /system/tio | |
parent | f873b9cf0c597ae4b76579020c578e9171bc86c3 (diff) | |
download | slackbuilds-80e8434217e62c2e337556bf64cab0b30795e20b.tar.xz |
system/tio: Added (Serial TTY).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/tio')
-rw-r--r-- | system/tio/README | 39 | ||||
-rw-r--r-- | system/tio/slack-desc | 19 | ||||
-rw-r--r-- | system/tio/tio.SlackBuild | 104 | ||||
-rw-r--r-- | system/tio/tio.info | 10 |
4 files changed, 172 insertions, 0 deletions
diff --git a/system/tio/README b/system/tio/README new file mode 100644 index 000000000000..f1eb09e35c44 --- /dev/null +++ b/system/tio/README @@ -0,0 +1,39 @@ +tio - a simple serial device I/O tool + +tio is a simple serial device tool which features a straightforward +command-line and configuration file interface to easily connect to +serial TTY devices for basic I/O operations. + +Features: + +- Easily connect to serial TTY devices +- Automatic connect and reconnect +- Sensible defaults (115200 8n1) +- Support for non-standard baud rates +- Support for mark and space parity +- X-modem (1K) and Y-modem file upload +- Support for RS-485 mode +- List available serial devices by ID +- Show RX/TX statistics +- Toggle serial lines +- Pulse serial lines with configurable pulse duration +- Local echo support +- Remapping of characters (nl, cr-nl, bs, lowercase to uppercase, etc.) +- Line timestamps +- Support for delayed output per character +- Support for delayed output per line +- Hexadecimal mode +- Log to file +- Autogeneration of log filename +- Configuration file support +- Activate sub-configurations by name or pattern +- Redirect I/O to UNIX socket or IPv4/v6 network socket for scripting or TTY sharing +- Pipe input and/or output +- Support for simple line request/response handling +- Bash completion on options, serial device names, and sub-configuration names +- Configurable text color +- Visual or audible alert on connect/disconnect +- Remapping of prefix key +- Man page documentation +- Binary size less than 90kB +- Plays nicely with [tmux](https://tmux.github.io) diff --git a/system/tio/slack-desc b/system/tio/slack-desc new file mode 100644 index 000000000000..31a8df7b188a --- /dev/null +++ b/system/tio/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------------------------------------------------------| +tio: tio (a simple serial device I/O tool) +tio: +tio: tio is a simple serial device tool which features a straightforward +tio: command-line and configuration file interface to easily connect to +tio: serial TTY devices for basic I/O operations. +tio: +tio: Homepage: https://github.com/tio/tio +tio: +tio: +tio: +tio: diff --git a/system/tio/tio.SlackBuild b/system/tio/tio.SlackBuild new file mode 100644 index 000000000000..3ee50d5092c8 --- /dev/null +++ b/system/tio/tio.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/bash + +# Slackware build script for tio + +# Copyright 2024 Andrzej Telszewski, Koszalin +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=tio +VERSION=${VERSION:-2.7} +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} + +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 -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP + +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION + +chown -R root:root . +chmod -R a-st,u+rwX,go-w+rX . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +meson setup \ + --buildtype=release \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc \ + -Dbashcompletiondir=/etc/bash_completion.d \ + . build + +meson compile -C build +meson install -C build --destdir=$PKG + +strip --strip-unneeded $PKG/usr/bin/tio +gzip -9 $PKG/usr/man/man1/tio.1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a example AUTHORS LICENSE NEWS README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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/tio/tio.info b/system/tio/tio.info new file mode 100644 index 000000000000..35528e770eb6 --- /dev/null +++ b/system/tio/tio.info @@ -0,0 +1,10 @@ +PRGNAM="tio" +VERSION="2.7" +HOMEPAGE="https://github.com/tio/tio" +DOWNLOAD="https://github.com/tio/tio/releases/download/v2.7/tio-2.7.tar.xz" +MD5SUM="58f589d1e9382e8cdebce4de03c6a797" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andrzej Telszewski" +EMAIL="andrzej@telszewski.com" |