aboutsummaryrefslogtreecommitdiff
path: root/net/nstxd
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-23 17:53:36 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-23 17:53:36 +0000
commiteaf6d87756fc794751c614f718fbaed4789a4b73 (patch)
tree26dd81a169ac5bcaabfb614d064b2940f94e7eca /net/nstxd
parent003831588b731610eae0daf56c5395d4fc606a45 (diff)
downloadports-eaf6d87756fc794751c614f718fbaed4789a4b73.tar.gz
ports-eaf6d87756fc794751c614f718fbaed4789a4b73.zip
Notes
Diffstat (limited to 'net/nstxd')
-rw-r--r--net/nstxd/Makefile40
-rw-r--r--net/nstxd/distinfo6
-rw-r--r--net/nstxd/files/nstxd.in65
-rw-r--r--net/nstxd/pkg-descr3
-rw-r--r--net/nstxd/pkg-message2
-rw-r--r--net/nstxd/pkg-plist3
6 files changed, 119 insertions, 0 deletions
diff --git a/net/nstxd/Makefile b/net/nstxd/Makefile
new file mode 100644
index 000000000000..67d0962659f0
--- /dev/null
+++ b/net/nstxd/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: nstxd
+# Date created: 1 April 2007
+# Whom: nagilum
+#
+# $FreeBSD$
+#
+
+PORTNAME= nstxd
+PORTVERSION= 1.1b6
+CATEGORIES= net
+MASTER_SITES= http://www.nagilum.org/nstx/ \
+ http://ftp.debian.org/debian/pool/main/n/nstx/
+DISTNAME= nstx_1.1-beta6.orig
+
+PATCH_SITES= http://www.nagilum.org/nstx/ \
+ http://ftp.debian.org/debian/pool/main/n/nstx/
+PATCH_DIST_STRIP= -p1
+PATCHFILES= nstx_1.1-beta6-4.diff.gz
+
+MAINTAINER= freebsd@nagilum.org
+COMMENT= DNS tunnel server
+
+MAN8= nstxd.8
+USE_RC_SUBR+= nstxd
+
+WRKSRC= ${WRKDIR}/nstx-1.1-beta6
+
+ALL_TARGET= nstxd
+INSTALL_TARGET= nstxd
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/nstxd ${PREFIX}/sbin
+ ${INSTALL_MAN} ${WRKSRC}/nstxd.8 ${PREFIX}/man/man8/
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
+ @${CAT} pkg-message
+.endif #NOPORTDOCS
+
+.include <bsd.port.mk>
diff --git a/net/nstxd/distinfo b/net/nstxd/distinfo
new file mode 100644
index 000000000000..5143bade46bd
--- /dev/null
+++ b/net/nstxd/distinfo
@@ -0,0 +1,6 @@
+MD5 (nstx_1.1-beta6.orig.tar.gz) = 275abd75a856b07a798b1f2360088cf5
+SHA256 (nstx_1.1-beta6.orig.tar.gz) = 57a1962a66e9cb64fe70839d852c56cd253092260eab589a8173740b75b21450
+SIZE (nstx_1.1-beta6.orig.tar.gz) = 20458
+MD5 (nstx_1.1-beta6-4.diff.gz) = 6c071c5179bfa62917842dd32080c139
+SHA256 (nstx_1.1-beta6-4.diff.gz) = f2fc046cc08831599f2a95c874b7a028238c73e1f2cd4964ee86aa4c4307b8a8
+SIZE (nstx_1.1-beta6-4.diff.gz) = 7743
diff --git a/net/nstxd/files/nstxd.in b/net/nstxd/files/nstxd.in
new file mode 100644
index 000000000000..82144c073167
--- /dev/null
+++ b/net/nstxd/files/nstxd.in
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: nstxd
+# REQUIRE: DAEMON
+
+#
+# Add the following lines to /etc/rc.conf to enable nstxd:
+#
+#nstxd_domain="<your nstx domain>"
+#
+# You can disable automatic startup specifying:
+#
+#nstxd_enable="NO"
+#
+# See nstxd(8) for flags.
+#
+# The default behavour of this script is to bind nstxd to the IP
+# of the interface with default route.
+# If you want it bind to the IP of a different interface you
+# specify this interface in /etc/rc.conf:
+#nstxd_interface="fxp0"
+# If you have static IPs or you want nstxd to listen only a
+# specific IP (e.g. 127.0.0.1) you can specify:
+#nstxd_ip="127.0.0.1"
+# in /etc/rc.conf
+#
+# This script can also take care of the tun interface configuration
+# you simply put something like
+#nstxd_ifconfig="172.16.1.1 172.16.1.2"
+# in /etc/rc.conf to have this script automatically run
+# ifconfig with the above parameter on the device opened by nstxd.
+#
+. %%RC_SUBR%%
+
+name=nstxd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/nstxd
+
+load_rc_config ${name}
+
+# set defaults
+nstxd_interface=${nstxd_interface:-$(route get default|grep interface|cut -d: -f2)}
+nstxd_ip=${nstxd_ip:-$(ifconfig ${nstxd_interface}|grep "inet "|xargs|cut -d' ' -f 2)}
+
+if [ -n "${nstxd_domain}" ]
+then nstxd_enable=${nstxd_enable:-"YES"}
+else nstxd_enable="NO"
+fi
+
+nstxd_flags=${nstxd_flags:-"-D -i ${nstxd_ip} ${nstxd_domain}"}
+
+tmpfile=$(mktemp /tmp/$(basename $0).XXXXXX) || exit 1
+run_rc_command "$1" 2>&1|tee ${tmpfile}
+nstx_if=$(grep "using device" ${tmpfile}|cut -d' ' -f5)
+rm -f ${tmpfile}
+
+if [ -n "${nstxd_ifconfig}" -a -n "${nstx_if}" ]
+then echo "Configuring nstx interface: ifconfig ${nstx_if} ${nstxd_ifconfig} up"
+ ifconfig ${nstx_if} ${nstxd_ifconfig}
+fi
+
diff --git a/net/nstxd/pkg-descr b/net/nstxd/pkg-descr
new file mode 100644
index 000000000000..4b835b616515
--- /dev/null
+++ b/net/nstxd/pkg-descr
@@ -0,0 +1,3 @@
+nstxd allows a nstx client daemon to tunnel IP traffic through DNS requests
+to the machine running nstxd.
+See %%PREFIX%%/share/doc/nstxd/README for more!
diff --git a/net/nstxd/pkg-message b/net/nstxd/pkg-message
new file mode 100644
index 000000000000..61450e8000a6
--- /dev/null
+++ b/net/nstxd/pkg-message
@@ -0,0 +1,2 @@
+You need to be able to specify this host in the NS record of a domainname to use this program.
+See ${PREFIX}/share/doc/nstxd/README for details!
diff --git a/net/nstxd/pkg-plist b/net/nstxd/pkg-plist
new file mode 100644
index 000000000000..8f46ba77e78d
--- /dev/null
+++ b/net/nstxd/pkg-plist
@@ -0,0 +1,3 @@
+sbin/nstxd
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%