diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2020-07-31 00:40:43 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2020-07-31 00:40:43 +0000 |
commit | 221d85fe8ee1a173c4c5f2794deac7f8d213a480 (patch) | |
tree | 7b72788c05facbf83924b77d7a31fae02d516770 | |
parent | 6e195e4fc0bf8bc4ef7d09e3897e9496ee3094f2 (diff) |
Notes
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/varnish-ip2location/Makefile | 49 | ||||
-rw-r--r-- | www/varnish-ip2location/distinfo | 3 | ||||
-rw-r--r-- | www/varnish-ip2location/files/patch-Makefile.am | 25 | ||||
-rw-r--r-- | www/varnish-ip2location/files/patch-src_vmod__ip2location.c | 14 | ||||
-rw-r--r-- | www/varnish-ip2location/pkg-descr | 7 |
6 files changed, 99 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 275ede3183d7..ae8cd2acae88 100644 --- a/www/Makefile +++ b/www/Makefile @@ -2280,6 +2280,7 @@ SUBDIR += uwsgi SUBDIR += uwsgitop SUBDIR += validator + SUBDIR += varnish-ip2location SUBDIR += varnish-ip2proxy SUBDIR += varnish-libvmod-awsrest SUBDIR += varnish-libvmod-digest diff --git a/www/varnish-ip2location/Makefile b/www/varnish-ip2location/Makefile new file mode 100644 index 000000000000..0d75766a7f51 --- /dev/null +++ b/www/varnish-ip2location/Makefile @@ -0,0 +1,49 @@ +# Created by: Ryan Steinmetz <zi@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= ip2location +PORTVERSION= 1.0.1 +CATEGORIES= www +PKGNAMEPREFIX= varnish- + +MAINTAINER= zi@FreeBSD.org +COMMENT= Varnish Module (vmod) for ip2location + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.TXT + +LIB_DEPENDS= libIP2Location.so:net/ip2location +BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} + +USES= autoreconf:build libtool pkgconfig python:build varnish:6 +USE_LDCONFIG= yes + +PLIST_FILES= lib/varnish/vmods/libvmod_ip2location.so + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-static +INSTALL_TARGET= install-strip +DOCSDIR= ${PREFIX}/share/doc/vmod-dynamic +MAKE_JOBS_UNSAFE= yes + +CFLAGS+= -I${WRKSRC}/src + +USE_GITHUB= yes +GH_ACCOUNT= ip2location +GH_PROJECT= ${PORTNAME}-varnish +GH_TAGNAME= 25928cf + +OPTIONS_DEFINE= DOCS + +post-extract: + @(cd ${WRKDIR} && ${LN} -sf IP2Location-Varnish-${GH_TAGNAME} \ + ${PORTNAME}-${PKGNAMEPREFIX}${GH_TAGNAME}) + +post-patch: + ${REINPLACE_CMD} 's|$${VARNISHAPI_DATAROOTDIR}|${LOCALBASE}/share|' \ + ${WRKSRC}/Makefile.am + +pre-configure: + (cd ${WRKSRC} && ${SH} ./autogen.sh) + +.include <bsd.port.mk> diff --git a/www/varnish-ip2location/distinfo b/www/varnish-ip2location/distinfo new file mode 100644 index 000000000000..5e592e107a48 --- /dev/null +++ b/www/varnish-ip2location/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1596149976 +SHA256 (ip2location-ip2location-varnish-1.0.1-25928cf_GH0.tar.gz) = d10c85a42efa5aed788fe6fc30e5761a057b63e99643e6a466dd2aca736a6111 +SIZE (ip2location-ip2location-varnish-1.0.1-25928cf_GH0.tar.gz) = 7056 diff --git a/www/varnish-ip2location/files/patch-Makefile.am b/www/varnish-ip2location/files/patch-Makefile.am new file mode 100644 index 000000000000..1b317c8a93c8 --- /dev/null +++ b/www/varnish-ip2location/files/patch-Makefile.am @@ -0,0 +1,25 @@ +--- Makefile.am.orig 2020-07-31 00:31:08 UTC ++++ Makefile.am +@@ -5,18 +5,11 @@ SUBDIRS = src + DISTCHECK_CONFIGURE_FLAGS = \ + VMOD_DIR='$${libdir}/varnish/vmods' + +-doc_DATA = README.rst LICENSE +-dist_man_MANS = vmod_ip2location.3 +-EXTRA_DIST = README.rst LICENSE CHANGES.rst ++doc_DATA = ++dist_man_MANS = ++EXTRA_DIST = LICENSE CHANGES.rst + + MAINTAINERCLEANFILES = $(dist_man_MANS) + +-vmod_ip2location.3: README.rst +-if HAVE_RST2MAN +- ${RST2MAN} README.rst $@ +-else +- @echo "========================================" +- @echo "You need rst2man installed to make dist" ++vmod_ip2location.3: + @echo "========================================" +- @false +-endif diff --git a/www/varnish-ip2location/files/patch-src_vmod__ip2location.c b/www/varnish-ip2location/files/patch-src_vmod__ip2location.c new file mode 100644 index 000000000000..3808b3447dc6 --- /dev/null +++ b/www/varnish-ip2location/files/patch-src_vmod__ip2location.c @@ -0,0 +1,14 @@ +--- src/vmod_ip2location.c.orig 2020-07-24 05:30:13 UTC ++++ src/vmod_ip2location.c +@@ -12,6 +12,11 @@ + #include <unistd.h> + #include <pthread.h> + ++#ifdef __FreeBSD__ ++#include <stdio.h> ++#define gcvt(v, d, c) sprintf(c, "%*g", d, v); ++#endif ++ + #include "cache/cache.h" + + /* Varnish < 6.2 compat */ diff --git a/www/varnish-ip2location/pkg-descr b/www/varnish-ip2location/pkg-descr new file mode 100644 index 000000000000..e77892c10974 --- /dev/null +++ b/www/varnish-ip2location/pkg-descr @@ -0,0 +1,7 @@ +A Varnish module that enables the website or server admins to find the +country, region, city, latitude, longitude, zip code, time zone, ISP, +domain name, connection type, area code, weather, mobile network, +elevation, usage type by IP address. The module reads the geo location +information from IP2Location BIN data file. + +WWW: https://github.com/ip2location/IP2Location-Varnish |