summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/tnftp/README28
-rw-r--r--network/tnftp/slack-desc2
-rw-r--r--network/tnftp/tnftp.SlackBuild76
-rw-r--r--network/tnftp/tnftp.info4
4 files changed, 83 insertions, 27 deletions
diff --git a/network/tnftp/README b/network/tnftp/README
index 3708885f16..ddfd7db051 100644
--- a/network/tnftp/README
+++ b/network/tnftp/README
@@ -1,4 +1,6 @@
-`tnftp' is a `port' of the NetBSD FTP client to other systems.
+tnftp (command line FTP client)
+
+tnftp is a port of the NetBSD FTP client to other systems.
The enhancements over the standard ftp client in 4.4BSD (and
derivatives) include:
@@ -13,7 +15,7 @@ derivatives) include:
(see `feat' and `remopts')
* extensions to ftp from the IETF ftpext working group
(see `mlsd' and `mlst')
- * IPv6 support (from the WIDE project)
+ * IPv6 support (from the WIDE project, see *Note below)
* modification time preservation
* paging of local and remote files, and of directory listings
(see `lpage', `page', `pdir')
@@ -23,7 +25,27 @@ derivatives) include:
* TIS Firewall Toolkit gate ftp proxy support (see `gate')
* transfer-rate throttling (see `-T', `rate')
* uploading of files on the command line (see `-u')
- * (Dante) SOCKS5 support
+ * (Dante) SOCKS5 support (see *Note, below)
Previous features, currently disabled until a test system is available:
* SOCKS4 support
+
+*Note:
+If you need SOCKS5 support, install network/dante before building this.
+
+It's not possible to build a single tnftp binary with both IPv6 and
+SOCKS5 support.
+
+The binary with IPv6 support is built and installed as
+"/usr/bin/tnftp.ipv6", with a symlink to "/usr/bin/tnftp". If
+dante is installed, a 2nd binary is built and installed as
+"/usr/bin/tnftp.socks". You can run it as "tnftp.socks", or, if desired,
+adjust the symlink so the SOCKS binary is run by default:
+
+# rm -f /usr/bin/tnftp
+# ln -s tnftp.socks /usr/bin/tnftp
+
+The package will still uninstall cleanly.
+
+If you have dante installed but do not want to build tnftp with SOCKS,
+you can export SOCKS=no in the environment.
diff --git a/network/tnftp/slack-desc b/network/tnftp/slack-desc
index 07e5f47668..af6314b45a 100644
--- a/network/tnftp/slack-desc
+++ b/network/tnftp/slack-desc
@@ -9,7 +9,6 @@
tnftp: tnftp (command line FTP client)
tnftp:
tnftp: tnftp is a port of the NetBSD FTP client to other systems.
-tnftp:
tnftp: It features command-line editing, a configurable prompt, context
tnftp: sensitive command and filename completion, a dynamic progress bar,
tnftp: IPv6 support (from the WIDE project), feature negotiation
@@ -17,3 +16,4 @@ tnftp: extensions from RFC 2389, extensions to ftp from the IETF ftpext
tnftp: working group, uploading of files on the command line and several
tnftp: other enhancements over the standard 4.4BSD ftp client.
tnftp:
+tnftp: This package was built @WITHSOCKS@ SOCKS5 (dante) support.
diff --git a/network/tnftp/tnftp.SlackBuild b/network/tnftp/tnftp.SlackBuild
index 32fb0248f4..3b6f930511 100644
--- a/network/tnftp/tnftp.SlackBuild
+++ b/network/tnftp/tnftp.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for tnftp
-# Copyright (c) 2014, 2015 Leonard Schmidt <lems@gmx.net>
+# Copyright (c) 2014, 2015 Leonard Schmidt <email removed>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -21,9 +21,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Now maintained by B. Watson <yalhcru@gmail.com>.
+
+# 20180629 bkw:
+# - Take over maintenance.
+# - Add 'todo' to docdir, BUILD=2.
+# - Build with optional SOCKS support if dante is installed.
+# - Script simplification.
+
PRGNAM=tnftp
VERSION=${VERSION:-20151004}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -64,35 +72,61 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --sysconfdir=/etc/tnftp \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux \
- --enable-editcomplete \
- --enable-ipv6 \
- --enable-ssl
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# ./configure --enable-ipv6 --with-socks
+# configure: WARNING: IPv6 is incompatible with socks, disabling IPv6 support
+# We can't build a single binary with both. So what we do here is build
+# 2 binaries (tnftp.ipv6 and tnftp.socks), symlink the ipv6 one to
+# /usr/bin/tnftp, and tell the user he can call the socks one by name,
+# or replace the symlink.
+
+# These configure options are used for both builds:
+runconfig() {
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --sysconfdir=/etc/tnftp \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --enable-editcomplete \
+ --enable-ssl \
+ "$@"
+}
+# First time around, build with ipv6 and no socks:
+runconfig --enable-ipv6 --without-socks
make
make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+mv $PKG/usr/bin/$PRGNAM $PKG/usr/bin/$PRGNAM.ipv6
+ln -s $PRGNAM.ipv6 $PKG/usr/bin/$PRGNAM
+
+# 2nd build, with socks but no ipv6, if dante is installed and
+# the user hasn't set SOCKS=no. Only the binary needs to be
+# installed, so don't "make install" again.
+if [ "${SOCKS:-yes}" = "yes" -a -e /usr/include/socks.h ]; then
+ WITHSOCKS="with"
+ make distclean
+ runconfig --disable-ipv6 --with-socks
+ make
+ install -s src/$PRGNAM $PKG/usr/bin/$PRGNAM.socks
+else
+ WITHSOCKS="without"
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog NEWS README THANKS $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a COPYING ChangeLog NEWS README THANKS 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
+sed "s,@WITHSOCKS@,$WITHSOCKS," $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/tnftp/tnftp.info b/network/tnftp/tnftp.info
index 9c7213d9b5..ab6241890a 100644
--- a/network/tnftp/tnftp.info
+++ b/network/tnftp/tnftp.info
@@ -6,5 +6,5 @@ MD5SUM="a49fbe752318d5a7893f900046ea00d5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Leonard Schmidt"
-EMAIL="lems@gmx.net"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"