From e2f64f5b9105dc1356cb4e1fa4cf5ca564d8daaa Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Sat, 15 Aug 2009 18:20:25 +0000 Subject: 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 --- dns/bind94/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'dns/bind94/Makefile') 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 -- cgit v1.2.3