summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2009-08-15 18:20:25 +0000
committerDoug Barton <dougb@FreeBSD.org>2009-08-15 18:20:25 +0000
commite2f64f5b9105dc1356cb4e1fa4cf5ca564d8daaa (patch)
tree1026c9a4086fc37b483a3eb23bf0f497eefe198d
parentFix with build with llvm/clang. (diff)
Add a slave port to bind94 for the GeoIP patch from Caraytech.
The most popular use of this patch is to send web site visitors to their nearest web server. Suppose you have a site called www.example555.com with two web servers: one in the US and one in England. You can use this patch in order for visitors from Europe to connect to the server in England and all other visitors to the server in the US. This is just one example of its usage. There are probably many others. WWW: http://www.caraytech.com/geodns/ I created a slave port rather than making this an option but other than that I was able to use the excellent work in the PR. PR: ports/119997 Submitted by: Jui-Nan Lin <jnlin@csie.nctu.edu.tw>
Notes
Notes: svn path=/head/; revision=239612
-rw-r--r--dns/bind94-geoip/Makefile18
-rw-r--r--dns/bind94-geoip/pkg-descr11
-rw-r--r--dns/bind94/Makefile27
-rw-r--r--dns/bind94/distinfo3
4 files changed, 59 insertions, 0 deletions
diff --git a/dns/bind94-geoip/Makefile b/dns/bind94-geoip/Makefile
new file mode 100644
index 000000000000..268ee0f9aa8a
--- /dev/null
+++ b/dns/bind94-geoip/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: bind94-geoip
+# Date created: August 15, 2009
+# Whom: Doug Barton <dougb@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+COMMENT= BIND with the Caraytech GeoIP patch
+
+MASTERDIR= ${.CURDIR}/../bind94
+
+CONFLICTS+= bind94-9.4.*
+
+DESCR= ${.CURDIR}/pkg-descr
+
+WITH_GEOIP= yes
+
+.include "${MASTERDIR}/Makefile"
diff --git a/dns/bind94-geoip/pkg-descr b/dns/bind94-geoip/pkg-descr
new file mode 100644
index 000000000000..018d2b86d5ce
--- /dev/null
+++ b/dns/bind94-geoip/pkg-descr
@@ -0,0 +1,11 @@
+The most popular use of this patch is to send web site visitors to their
+nearest web server. Suppose you have a site called www.example555.com with
+two web servers: one in the US and one in England. You can use this patch
+in order for visitors from Europe to connect to the server in England and
+all other visitors to the server in the US. This is just one example of
+its usage. There are probably many others.
+
+WWW: http://www.caraytech.com/geodns/
+
+- Doug Barton
+DougB@FreeBSD.org
diff --git a/dns/bind94/Makefile b/dns/bind94/Makefile
index d73f3d93dd58..58a461d44bd8 100644
--- a/dns/bind94/Makefile
+++ b/dns/bind94/Makefile
@@ -88,6 +88,26 @@ CONFIGURE_ARGS+= --prefix=${PREFIX} \
BIND_DESTETC= ${PREFIX}/etc
.endif
+# For this feature please use the slave port: ../bind94-geoip
+.if defined(WITH_GEOIP)
+PKGNAMESUFFIX= -geoip
+LIB_DEPENDS+= GeoIP:${PORTSDIR}/net/GeoIP
+
+CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib" \
+ LIBS="-L${LOCALBASE}/lib -lGeoIP"
+
+GEOIP_PATCH= ${WRKDIR}/bind-${GEOIP_PATCH_VER}-geodns-patch/patch.diff
+GEOIP_PATCH_VER= 9.4.1
+
+DISTFILES+= bind-${GEOIP_PATCH_VER}-geodns-patch.tar.gz:geodns
+MASTER_SITES+= http://www.caraytech.com/geodns/:geodns
+EXTRACT_ONLY+= bind-${GEOIP_PATCH_VER}-geodns-patch.tar.gz
+EXTRA_PATCHES+= ${GEOIP_PATCH}
+.else
+CONFLICTS+= bind94-geoip-9.4.*
+.endif
+
PLIST_SUB= BIND_DESTETC="${BIND_DESTETC}"
MAN1= dig.1 host.1 nslookup.1 nsupdate.1
@@ -132,6 +152,13 @@ MLINKS= named-checkzone.8 named-compilezone.8
verify: checksum
gpg --verify ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}.asc
+pre-patch:
+.if defined(WITH_GEOIP)
+ @${CP} ${GEOIP_PATCH} ${GEOIP_PATCH}.presed
+ @${SED} -e 's#bind-9.4.1-P1[^/]*/##g' ${GEOIP_PATCH}.presed > \
+ ${GEOIP_PATCH}
+.endif
+
post-patch:
.for FILE in check/named-checkconf.8 named/named.8 nsupdate/nsupdate.1 \
rndc/rndc.8
diff --git a/dns/bind94/distinfo b/dns/bind94/distinfo
index c51a3bec4c09..37b58403aa53 100644
--- a/dns/bind94/distinfo
+++ b/dns/bind94/distinfo
@@ -4,3 +4,6 @@ SIZE (bind-9.4.3-P3.tar.gz) = 6544968
MD5 (bind-9.4.3-P3.tar.gz.asc) = 69fff246b46d78ff1b4f6a89ad516bb6
SHA256 (bind-9.4.3-P3.tar.gz.asc) = 26fe58193633b7402a0e01a2502ee6cac52f6a41879198429979f09fde221bc7
SIZE (bind-9.4.3-P3.tar.gz.asc) = 481
+MD5 (bind-9.4.1-geodns-patch.tar.gz) = d3d515bdef525f9a31787b36a105e690
+SHA256 (bind-9.4.1-geodns-patch.tar.gz) = 352413037e4779519c0a5b70aef801c8f84bcf15d1d485b16096d75f83644a65
+SIZE (bind-9.4.1-geodns-patch.tar.gz) = 2057