forked from Lainports/freebsd-ports
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>
This commit is contained in:
parent
2d2eff3b88
commit
e2f64f5b91
4 changed files with 59 additions and 0 deletions
18
dns/bind94-geoip/Makefile
Normal file
18
dns/bind94-geoip/Makefile
Normal file
|
|
@ -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"
|
||||
11
dns/bind94-geoip/pkg-descr
Normal file
11
dns/bind94-geoip/pkg-descr
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue