find src -name .travis.yml -delete
rm -fr src/github.com/davecgh/go-xdr/xdr
rm -fr src/github.com/gorhill/cronexpr/cronexpr src/github.com/gorhill/cronexpr/APLv2
+rm -fr ports
rm makedist.sh
cat > doc/download.texi <<EOF
--- /dev/null
+# $FreeBSD$
+
+PORTNAME= nncp
+PORTVERSION= 0.2
+CATEGORIES= net
+MASTER_SITES= http://www.nncpgo.org/download/ \
+ http://sourceforge.net/projects/nncp/files/
+
+MAINTAINER= stargrave@stargrave.org
+COMMENT= Utilities for secure store-and-forward files and mail exchanging
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= go:lang/go
+
+USES= tar:xz
+MAKEFILE= BSDmakefile
+
+USE_RC_SUBR= nncp-caller nncp-daemon
+REQUIRE= DAEMON
+
+SUB_FILES= pkg-message pkg-deinstall nncp.newsyslog.conf
+
+PORTDOCS= AUTHORS NEWS README THANKS
+INFO= nncp
+INSTALL_TARGET= install-strip
+
+PLIST_FILES= bin/nncp-call \
+ bin/nncp-caller \
+ bin/nncp-check \
+ bin/nncp-daemon \
+ bin/nncp-file \
+ bin/nncp-freq \
+ bin/nncp-log \
+ bin/nncp-mail \
+ bin/nncp-newnode \
+ bin/nncp-pkt \
+ bin/nncp-stat \
+ bin/nncp-toss \
+ bin/nncp-xfer \
+ etc/newsyslog.conf.d/nncp.conf
+PLIST_DIRS= /var/spool/nncp
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
+ ${INSTALL_DATA} ${WRKDIR}/nncp.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/nncp.conf
+ ${MKDIR} ${STAGEDIR}/var/spool/nncp
+
+.include <bsd.port.mk>
--- /dev/null
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: nncp-caller
+# REQUIRE: DAEMON NETWORKING FILESYSTEMS
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# nncp_caller_enable (bool): Set to NO by default.
+# Set it to YES to enable nncp-caller.
+# nncp_caller_config (path): Set to %%PREFIX%%/etc/nncp.yaml by default.
+
+. /etc/rc.subr
+
+name=nncp_caller
+rcvar=nncp_caller_enable
+
+load_rc_config $name
+
+: ${nncp_caller_enable:="NO"}
+: ${nncp_caller_config="%%PREFIX%%/etc/nncp.yaml"}
+
+command=%%PREFIX%%/bin/nncp-caller
+command_args="-quiet -cfg $nncp_caller_config &"
+
+run_rc_command "$1"
--- /dev/null
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: nncp-daemon
+# REQUIRE: DAEMON NETWORKING FILESYSTEMS
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# nncp_daemon_enable (bool): Set to NO by default.
+# Set it to YES to enable nncp-daemon.
+# nncp_daemon_config (path): Set to %%PREFIX%%/etc/nncp.yaml by default.
+# nncp_daemon_bind (string): Address:port to bind to
+# Default is "[::]:5400".
+
+. /etc/rc.subr
+
+name=nncp_daemon
+rcvar=nncp_daemon_enable
+
+load_rc_config $name
+
+: ${nncp_daemon_enable:="NO"}
+: ${nncp_daemon_config="%%PREFIX%%/etc/nncp.yaml"}
+: ${nncp_daemon_bind="[::]:5400"}
+
+command=%%PREFIX%%/bin/nncp-daemon
+command_args="-quiet -bind $nncp_daemon_bind -cfg $nncp_daemon_config &"
+
+run_rc_command "$1"
--- /dev/null
+/var/log/nncp.log 644 7 100 * CXN
--- /dev/null
+#!/bin/sh
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+if [ -e %%PREFIX%%/etc/nncp.yaml ]; then
+ echo "%%PREFIX%%/etc/nncp.yaml with your private keys is not removed!"
+fi
+
+if [ -e /var/spool/nncp ]; then
+ echo "/var/spool/nncp is not removed!"
+fi
--- /dev/null
+======================================================================
+- Add the following line to /etc/rc.conf to enable nncp-daemon:
+
+ nncp_daemon_enable="YES"
+
+- Add the following line to /etc/rc.conf to enable nncp-caller:
+
+ nncp_caller_enable="YES"
+
+- %%PREFIX%%/etc/newsyslog.conf.d/nncp.conf
+ log rotation configuration has been installed.
+- /var/spool/nncp is the packet spool directory.
+- Generate NNCP configuration file using the command:
+
+ # umask 077
+ # nncp-newnode > %%PREFIX%%/etc/nncp.yaml
+======================================================================
--- /dev/null
+NNCP (Node to Node copy) is a collection of utilities simplifying
+secure store-and-forward files and mail exchanging.
+
+This utilities are intended to help build up small size (dozens of
+nodes) ad-hoc friend-to-friend (F2F) statically routed darknet networks
+for fire-and-forget secure reliable files, file requests and Internet
+mail transmission. All packets are integrity checked, end-to-end
+encrypted (E2EE), explicitly authenticated by known participants public
+keys. Onion encryption is applied to relayed packets. Each node acts
+both as a client and server, can use push and poll behaviour model.
+
+Out-of-box offline sneakernet/floppynet, dead drops and air-gapped
+computers support. But online TCP daemon with full-duplex resumable data
+transmission exists.
+
+WWW: http://www.nncpgo.org/