diff options
author | miwi <miwi@FreeBSD.org> | 2011-03-04 21:45:40 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2011-03-04 21:45:40 +0800 |
commit | e6752ca5668d7858ba5e5e4868c5181aaced588b (patch) | |
tree | 88720666b2010b00599d313193d990c1b2832668 /dns/curvedns | |
parent | 4b2ac075b59b8a92e8a3bee757acc8346541132a (diff) | |
download | freebsd-ports-gnome-e6752ca5668d7858ba5e5e4868c5181aaced588b.tar.gz freebsd-ports-gnome-e6752ca5668d7858ba5e5e4868c5181aaced588b.tar.zst freebsd-ports-gnome-e6752ca5668d7858ba5e5e4868c5181aaced588b.zip |
CurveDNS is a forwarding nameserver adding DNSCurve to DNS,
and it's the first publicly released forwarding implementation
that implements the DNSCurve protocol.
WWW: http://curvedns.on2it.net/
PR: ports/153881
Submitted by: Leo Vandewoestijne <freebsd at dns-lab.com>
Diffstat (limited to 'dns/curvedns')
-rw-r--r-- | dns/curvedns/Makefile | 58 | ||||
-rw-r--r-- | dns/curvedns/distinfo | 2 | ||||
-rw-r--r-- | dns/curvedns/files/freebsd.patch | 25 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-deinstall.in | 6 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-install.in | 25 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-message.in | 21 | ||||
-rw-r--r-- | dns/curvedns/pkg-descr | 5 | ||||
-rw-r--r-- | dns/curvedns/pkg-plist | 3 |
8 files changed, 145 insertions, 0 deletions
diff --git a/dns/curvedns/Makefile b/dns/curvedns/Makefile new file mode 100644 index 000000000000..98d5700d4c1d --- /dev/null +++ b/dns/curvedns/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: curvedns +# Date created: 11 Januari 2011 +# Whom: Leo Vandewoestijne <freebsd@dns-lab.com> +# +# $FreeBSD$ +# + +PORTNAME= curvedns +PORTVERSION= 0.88.b +CATEGORIES= dns +MASTER_SITES= http://curvedns.on2it.net/releases/ +DISTNAME= curvedns-0.88-unstable + +MAINTAINER= freebsd@dns-lab.com +COMMENT= A forwarder adding DNSCurve to an authoritive nameserver + +LIB_DEPENDS= ev.3:${PORTSDIR}/devel/libev +RUN_DEPENDS= setuidgid:${PORTSDIR}/sysutils/daemontools +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash + +HAS_CONFIGURE= yes +CONFIGURE_SCRIPT= configure.nacl +ALL_TARGET= # yes, an empty target. + +CURVE_USER= bind +CURVE_GROUP= bind +CURVE_UID= 53 +CURVE_GID= 53 + +SUB_FILES= pkg-install pkg-message pkg-deinstall +SUB_LIST= CURVE_USER=${CURVE_USER} \ + CURVE_GROUP=${CURVE_GROUP} \ + CURVE_UID=${CURVE_UID} \ + CURVE_GID=${CURVE_GID} + +post-patch: + @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/freebsd.patch + +pre-configure: + @${ECHO_MSG} "===> configuring may take a couple of minutes" + +post-configure: + @cd ${WRKSRC} && ./configure.curvedns + +post-install: + ${CP} ${WRKSRC}/curvedns ${WRKSRC}/curvedns-keygen ${PREFIX}/bin/ + ${MKDIR} ${PREFIX}/etc/curvedns/log ${PREFIX}/etc/curvedns/env + ${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run + ${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run + ${ECHO} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID + ${ECHO} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID + ${CHOWN} -R ${CURVE_UID}:${CURVE_GID} ${PREFIX}/etc/curvedns + ${CHMOD} 755 ${PREFIX}/etc/curvedns/run ${PREFIX}/etc/curvedns/log/run + ${CHMOD} 0700 ${PREFIX}/etc/curvedns/env + ${SH} ${PKGINSTALL} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/dns/curvedns/distinfo b/dns/curvedns/distinfo new file mode 100644 index 000000000000..46bace857a1f --- /dev/null +++ b/dns/curvedns/distinfo @@ -0,0 +1,2 @@ +SHA256 (curvedns-0.88-unstable.tar.gz) = d43e068d2710cc3fc4bf3e7e46d3fac79c0ff66d28cb04148adec2237d339d49 +SIZE (curvedns-0.88-unstable.tar.gz) = 330546 diff --git a/dns/curvedns/files/freebsd.patch b/dns/curvedns/files/freebsd.patch new file mode 100644 index 000000000000..52d9299d6d07 --- /dev/null +++ b/dns/curvedns/files/freebsd.patch @@ -0,0 +1,25 @@ +diff -rupN curvedns-0.88-unstable.orig/Makefile.in curvedns-0.88-unstable/Makefile.in +--- curvedns-0.88-unstable/.orig/Makefile.in 2011-01-10 21:15:14.000000000 +0000 ++++ curvedns-0.88-unstable/Makefile.in 2011-01-10 23:12:35.000000000 +0000 +@@ -8,9 +8,9 @@ NACLINC=nacl/build/include/$(ABI) + CDNSCFLAGS=-Wall -fno-strict-aliasing -O3 -I$(NACLINC) + + # If you have libev at a non-standard place, specify that here: +-#EV= +-#EVCFLAGS=-I$(EV)/include +-#EVLDFLAGS=-L$(EV)/lib ++EV=$(PREFIX) ++EVCFLAGS=-I$(EV)/include ++EVLDFLAGS=-L$(EV)/lib + + CC=@CC@ + CFLAGS=@CFLAGS@ $(CDNSCFLAGS) $(EVCFLAGS) +@@ -33,7 +33,7 @@ distclean: clean + rm -f Makefile + + install: +- @echo Sorry, no automated install. Copy the following binaries to your preferred destination path: ++ @echo Copieng the following binaries to /usr/local/bin + @echo " $(TARGETS)" + + debug.o: debug.c debug.h diff --git a/dns/curvedns/files/pkg-deinstall.in b/dns/curvedns/files/pkg-deinstall.in new file mode 100644 index 000000000000..b5b0138d4221 --- /dev/null +++ b/dns/curvedns/files/pkg-deinstall.in @@ -0,0 +1,6 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +rm -rf %%PREFIX%%/etc/curvedns diff --git a/dns/curvedns/files/pkg-install.in b/dns/curvedns/files/pkg-install.in new file mode 100644 index 000000000000..31d86150cf58 --- /dev/null +++ b/dns/curvedns/files/pkg-install.in @@ -0,0 +1,25 @@ +#!/bin/sh +# $FreeBSD$ + +if ! pw groupshow %%CURVE_GROUP%% 2>/dev/null 1>&2; then + if pw groupadd %%CURVE_GROUP%% -g %%CURVE_GID%%; then + echo "Added group %%CURVE_GROUP%%" + else + echo "Adding group %%CURVE_GROUP%% failed..." + exit 1 + fi +fi + +if ! pw usershow %%CURVE_USER%% 2>/dev/null 1>&2; then + if pw useradd %%CURVE_USER%% -u %%CURVE_UID%% -g %%CURVE_GROUP%% -h - \ + -s "/usr/sbin/nologin" -d "/" \ + -c "Bind Sandbox"; \ + then + echo "Added user %%CURVE_USER%%" + else + echo "Adding user %%CURVE_USER%% failed..." + exit 1 + fi +fi + +exit 0 diff --git a/dns/curvedns/files/pkg-message.in b/dns/curvedns/files/pkg-message.in new file mode 100644 index 000000000000..15ff40d9a1e9 --- /dev/null +++ b/dns/curvedns/files/pkg-message.in @@ -0,0 +1,21 @@ +########################################################### + + To start using curvedns, finish these tasks: + +------- generate/install keys ----------------------------- + curvedns-keygen %%PREFIX%%/etc/curvedns ns1.example.net + +------- configure ----------------------------------------- + $EDITOR %%PREFIX%%/etc/curvedns/run + +------- prepare/startup ----------------------------------- + mkdir /var/service + ln -s %%PREFIX%%/etc/curvedns /var/service + echo svscan_enable=\"YES\" >> /etc/rc.conf + %%PREFIX%%/etc/rc.d/svscan start + +------- verify -------------------------------------------- + dig @<curvedns-ip> auth-dom.example any + drill <curvedns-ip> auth-dom.example any + +########################################################### diff --git a/dns/curvedns/pkg-descr b/dns/curvedns/pkg-descr new file mode 100644 index 000000000000..5de990cdd428 --- /dev/null +++ b/dns/curvedns/pkg-descr @@ -0,0 +1,5 @@ +CurveDNS is a forwarding nameserver adding DNSCurve to DNS, +and it's the first publicly released forwarding implementation +that implements the DNSCurve protocol. + +WWW: http://curvedns.on2it.net/ diff --git a/dns/curvedns/pkg-plist b/dns/curvedns/pkg-plist new file mode 100644 index 000000000000..b493fa510818 --- /dev/null +++ b/dns/curvedns/pkg-plist @@ -0,0 +1,3 @@ +bin/curvedns +bin/curvedns-keygen +@dirrmtry etc/curvedns |