summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2022-08-25 12:11:57 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-08-27 22:50:29 +0700
commiteb3a348246b1237333a5d7166c9696e09e65d00d (patch)
treed20b9f395f4c24533e2607f3470957abd365e197 /network
parentfc9af87b121a30dc3dcb66164f3dc07144842064 (diff)
downloadslackbuilds-eb3a348246b1237333a5d7166c9696e09e65d00d.tar.gz
slackbuilds-eb3a348246b1237333a5d7166c9696e09e65d00d.tar.xz
network/uredir: Added (userspace UDP port redirector)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/uredir/README12
-rw-r--r--network/uredir/slack-desc19
-rw-r--r--network/uredir/uredir.SlackBuild110
-rw-r--r--network/uredir/uredir.info12
4 files changed, 153 insertions, 0 deletions
diff --git a/network/uredir/README b/network/uredir/README
new file mode 100644
index 0000000000..561e234c61
--- /dev/null
+++ b/network/uredir/README
@@ -0,0 +1,12 @@
+uredir (userspace UDP port redirector)
+
+uredir is a small tool to redirect UDP traffic. It can be used as a
+poor man's filtering tool, e.g. for small multihomed embedded systems
+without a built-in firewall.
+
+uredir forwards packets to a specified destination, remembering the
+sender's address. Any packets received from the destination are in
+turn forwarded to the sender.
+
+uredir can be run standalone or via inetd. See uredir's man page for
+details.
diff --git a/network/uredir/slack-desc b/network/uredir/slack-desc
new file mode 100644
index 0000000000..f65eb0c5ec
--- /dev/null
+++ b/network/uredir/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------------------------------------------------------|
+uredir: uredir (userspace UDP port redirector)
+uredir:
+uredir: uredir is a small tool to redirect UDP traffic. It can be used as a
+uredir: poor man's filtering tool, e.g. for small multihomed embedded systems
+uredir: without a built-in firewall.
+uredir:
+uredir: uredir forwards packets to a specified destination, remembering the
+uredir: sender's address. Any packets received from the destination are in
+uredir: turn forwarded to the sender.
+uredir:
+uredir:
diff --git a/network/uredir/uredir.SlackBuild b/network/uredir/uredir.SlackBuild
new file mode 100644
index 0000000000..70b51e4b0b
--- /dev/null
+++ b/network/uredir/uredir.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/bash
+
+# Slackware build script for uredir
+
+# 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=uredir
+VERSION=${VERSION:-3.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# This thing depends on a library nothing else uses, just bundle it.
+LIBNAM=libuev
+LIBVER=${LIBVER:-2.4.0}
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+TOPDIR="$(pwd)"
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$LIBNAM-$LIBVER.tar.xz
+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 {} \+
+
+# First the library (static build):
+cd $LIBNAM-$LIBVER
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-static \
+ --disable-shared \
+ --prefix="$TOPDIR/libinst" \
+ --disable-doxygen-doc \
+ --disable-examples \
+ --build=$ARCH-slackware-linux
+make
+make install-strip
+
+# Now use it to build the main program:
+cd $TOPDIR/$PRGNAM-$VERSION
+
+PKG_CONFIG_PATH="$TOPDIR/libinst/lib/pkgconfig:$PKG_CONFIG_PATH" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*.?
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS $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
diff --git a/network/uredir/uredir.info b/network/uredir/uredir.info
new file mode 100644
index 0000000000..ad848d55fc
--- /dev/null
+++ b/network/uredir/uredir.info
@@ -0,0 +1,12 @@
+PRGNAM="uredir"
+VERSION="3.3"
+HOMEPAGE="https://github.com/troglobit/uredir"
+DOWNLOAD="https://github.com/troglobit/uredir/releases/download/v3.3/uredir-3.3.tar.gz \
+ https://github.com/troglobit/libuev/releases/download/v2.4.0/libuev-2.4.0.tar.xz"
+MD5SUM="a42ee27e84de2e08e35ee733508bb6ea \
+ 707fac6253f3a4f662ec3848798ae63f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"