summaryrefslogtreecommitdiff
path: root/network/ncp
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-11-14 06:04:20 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-11-14 17:16:42 +0700
commitbf5da0a0ca6432eaf8961a1997c4caf850e4f99a (patch)
tree2c8ea18b514df89670bbfe91203596a8099685fe /network/ncp
parenta855bedaca9bc06bdec4d752456ea3a759c5ae42 (diff)
downloadslackbuilds-bf5da0a0ca6432eaf8961a1997c4caf850e4f99a.tar.gz
network/ncp: Added (fast file copy tool for LANs)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/ncp')
-rw-r--r--network/ncp/README16
-rw-r--r--network/ncp/README.upstream54
-rw-r--r--network/ncp/ncp.SlackBuild69
-rw-r--r--network/ncp/ncp.info10
-rw-r--r--network/ncp/slack-desc19
5 files changed, 168 insertions, 0 deletions
diff --git a/network/ncp/README b/network/ncp/README
new file mode 100644
index 0000000000..21f741ce7d
--- /dev/null
+++ b/network/ncp/README
@@ -0,0 +1,16 @@
+ncp (fast file copy tool for LANs)
+
+"ncp" is a utility for copying files in a LAN. It has absolutely no
+security or integrity checking, no throttling, no features, except
+one: you don't have to type the coordinates of your peer.
+
+Basically it works like this:
+
+ 1. You and your buddy want to play Quake.
+ 2. Your buddy has a level that you don't have.
+ 3. He types "npush filename" and waits. npush sends out UDP
+ announcement packets proclaiming that someone wants to send
+ something.
+ 4. You type "npoll". npoll waits until it sees one of these packets.
+ 5. The files are copied with tar over a TCP socket, so permissions and
+ file dates (and if you are root, owners) are preserved.
diff --git a/network/ncp/README.upstream b/network/ncp/README.upstream
new file mode 100644
index 0000000000..d25d9b1c2d
--- /dev/null
+++ b/network/ncp/README.upstream
@@ -0,0 +1,54 @@
+ ncp - a fast file copy tool for LANs
+
+(Note: This is from 2000 and has not been touched since. I still use it on a
+daily basis)
+
+Download it from http://dl.fefe.de/ncp-1.2.4.tar.bz2 [pgp sig]! The current
+version is 1.2.4. Recent changes: switch to libowfat
+
+Good news: I got an email from Ripclaw from Rock Linux who told me that they are
+going to integrate ncp.
+
+Please note that on recent IPv6 implementations, link-local addresses are not
+valid without specifying an interface, so you can't npoll with a link-local
+address on the command line. Standard npush/npoll now works with link-local
+addresses, though. Due to Linux 2.4.0test brokenness, you currently can't npoll
+from the same machine that runs npush.
+
+Since ncp is based on libdjb, it features full IPv6 support and the DNS resolver
+is built in, i.e. no more security problems because of lame libc functions.
+
+I also provide a statically linked x86 Linux binary [sig] compressed with upx
+which only weighs in at ~20k. I shrunk the binary with diet libc.
+
+npush will now use IPv6 and IPv4 multicast on the multicast groups
+ff02::6e63:7030 (6e63:7030 == 'ncp0') and 224.110.99.112 (110.99.112 == 'ncp').
+If both methods fail, npush will resort to the broadcast packets used by
+previous versions. You can force the broadcast method by passing "-b" to npush
+so that previous npoll versions can see the announcements.
+
+"ncp" is a utility for copying files in a LAN. It has absolutely no security or
+integrity checking, no throttling, no features, except one: you don't have to
+type the coordinates of your peer.
+
+Please note that the DNS resolver does not use /etc/hosts (as that would not
+work with IPv6 anyway), so you should have a properly configured DNS server.
+
+Basically it works like this:
+ 1. You and your buddy want to play Quake
+ 2. Your buddy has a level that you don't have
+ 3. He types npush filename and waits. npush sends out UDP announcement packets
+ proclaiming that someone wants to send something
+ 4. You type npoll. npoll waits until it sees one of these packets
+ 5. The files are copied with tar over a TCP socket, so permissions and file
+ dates (and if you are root, owners) are preserved.
+
+There are other usage modes. You can also use it like this:
+
+ peer1$ ncp
+ peer2$ ncp peer1 file1 file2 file3
+
+or like this:
+
+ peer1$ npush file1
+ peer2$ npoll peer1
diff --git a/network/ncp/ncp.SlackBuild b/network/ncp/ncp.SlackBuild
new file mode 100644
index 0000000000..3163631086
--- /dev/null
+++ b/network/ncp/ncp.SlackBuild
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Slackware build script for ncp
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=ncp
+VERSION=${VERSION:-1.2.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod 644 *
+
+# We want symlinks, not hardlinks.
+sed -i 's,ln -f,ln -s,' GNUmakefile
+
+# The libowfat detection stuff needs a little help...
+make PREFIX=/usr CFLAGS="$SLKCFLAGS -Wl,-s -I/opt/diet/include/libowfat"
+make install PREFIX=$PKG/usr
+gzip $PKG/usr/man/man1/*.1
+ln -s npush.1.gz $PKG/usr/man/man1/npoll.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a NEWS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Upstream doesn't include a README with the source, so here's the web page
+# rendered as text (with links).
+cat $CWD/README.upstream > $PKG/usr/doc/$PRGNAM-$VERSION/README
+
+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:-tgz}
diff --git a/network/ncp/ncp.info b/network/ncp/ncp.info
new file mode 100644
index 0000000000..8da636b238
--- /dev/null
+++ b/network/ncp/ncp.info
@@ -0,0 +1,10 @@
+PRGNAM="ncp"
+VERSION="1.2.4"
+HOMEPAGE="http://www.fefe.de/ncp/"
+DOWNLOAD="http://dl.fefe.de/ncp-1.2.4.tar.bz2"
+MD5SUM="421c4855bd3148b7d0a4342942b4bf13"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libowfat"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/network/ncp/slack-desc b/network/ncp/slack-desc
new file mode 100644
index 0000000000..4895444571
--- /dev/null
+++ b/network/ncp/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------------------------------------------------------|
+ncp: ncp (fast file copy tool for LANs)
+ncp:
+ncp: "ncp" is a utility for copying files in a LAN. It has absolutely no
+ncp: security or integrity checking, no throttling, no features, except
+ncp: one: you don't have to type the coordinates of your peer.
+ncp:
+ncp:
+ncp:
+ncp:
+ncp:
+ncp: