svn commit: r543839 - in head/www: . varnish-ip2location varnish-ip2location/files
Ryan Steinmetz
zi at FreeBSD.org
Fri Jul 31 00:40:45 UTC 2020
Author: zi
Date: Fri Jul 31 00:40:43 2020
New Revision: 543839
URL: https://svnweb.freebsd.org/changeset/ports/543839
Log:
New port: www/varnish-ip2location:
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
Added:
head/www/varnish-ip2location/
head/www/varnish-ip2location/Makefile (contents, props changed)
head/www/varnish-ip2location/distinfo (contents, props changed)
head/www/varnish-ip2location/files/
head/www/varnish-ip2location/files/patch-Makefile.am (contents, props changed)
head/www/varnish-ip2location/files/patch-src_vmod__ip2location.c (contents, props changed)
head/www/varnish-ip2location/pkg-descr (contents, props changed)
Modified:
head/www/Makefile
Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile Fri Jul 31 00:37:23 2020 (r543838)
+++ head/www/Makefile Fri Jul 31 00:40:43 2020 (r543839)
@@ -2280,6 +2280,7 @@
SUBDIR += uwsgi
SUBDIR += uwsgitop
SUBDIR += validator
+ SUBDIR += varnish-ip2location
SUBDIR += varnish-ip2proxy
SUBDIR += varnish-libvmod-awsrest
SUBDIR += varnish-libvmod-digest
Added: head/www/varnish-ip2location/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish-ip2location/Makefile Fri Jul 31 00:40:43 2020 (r543839)
@@ -0,0 +1,49 @@
+# Created by: Ryan Steinmetz <zi at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= ip2location
+PORTVERSION= 1.0.1
+CATEGORIES= www
+PKGNAMEPREFIX= varnish-
+
+MAINTAINER= zi at 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>
Added: head/www/varnish-ip2location/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish-ip2location/distinfo Fri Jul 31 00:40:43 2020 (r543839)
@@ -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
Added: head/www/varnish-ip2location/files/patch-Makefile.am
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish-ip2location/files/patch-Makefile.am Fri Jul 31 00:40:43 2020 (r543839)
@@ -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
Added: head/www/varnish-ip2location/files/patch-src_vmod__ip2location.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish-ip2location/files/patch-src_vmod__ip2location.c Fri Jul 31 00:40:43 2020 (r543839)
@@ -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 */
Added: head/www/varnish-ip2location/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/varnish-ip2location/pkg-descr Fri Jul 31 00:40:43 2020 (r543839)
@@ -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
More information about the svn-ports-head
mailing list