diff options
author | Doug Barton <dougb@FreeBSD.org> | 2009-08-15 18:20:25 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2009-08-15 18:20:25 +0000 |
commit | e2f64f5b9105dc1356cb4e1fa4cf5ca564d8daaa (patch) | |
tree | 1026c9a4086fc37b483a3eb23bf0f497eefe198d /dns/bind94/Makefile | |
parent | Fix 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
Diffstat (limited to 'dns/bind94/Makefile')
-rw-r--r-- | dns/bind94/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
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 |