aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/Makefile1
-rw-r--r--net/py-GeoIP2/Makefile27
-rw-r--r--net/py-GeoIP2/distinfo2
-rw-r--r--net/py-GeoIP2/pkg-descr4
4 files changed, 34 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 58d866b77f10..09785aa215e0 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -897,6 +897,7 @@
SUBDIR += pxe
SUBDIR += pxe-pdhcp
SUBDIR += py-GeoIP
+ SUBDIR += py-GeoIP2
SUBDIR += py-amqp
SUBDIR += py-amqplib
SUBDIR += py-avahi
diff --git a/net/py-GeoIP2/Makefile b/net/py-GeoIP2/Makefile
new file mode 100644
index 000000000000..2b1c75ff003c
--- /dev/null
+++ b/net/py-GeoIP2/Makefile
@@ -0,0 +1,27 @@
+# Created by: Olivier Cochard-Labbé <olivier@cochard.me>
+# $FreeBSD$
+
+PORTNAME= GeoIP2
+PORTVERSION= 2.1.0
+CATEGORIES= net python geography
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}-Python-${PORTVERSION}
+
+MAINTAINER= olivier@cochard.me
+COMMENT= MaxMind GeoIP2 Python API
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>0:${PORTSDIR}/www/py-requests
+LIB_DEPENDS= libmaxminddb.so:${PORTSDIR}/net/libmaxminddb
+
+USE_GITHUB= yes
+GH_ACCOUNT= maxmind
+GH_PROJECT= GeoIP2-python
+GH_TAGNAME= v${PORTVERSION}
+
+USES= python
+USE_PYTHON= autoplist distutils
+
+.include <bsd.port.mk>
diff --git a/net/py-GeoIP2/distinfo b/net/py-GeoIP2/distinfo
new file mode 100644
index 000000000000..4dd6b9a38a18
--- /dev/null
+++ b/net/py-GeoIP2/distinfo
@@ -0,0 +1,2 @@
+SHA256 (GeoIP2-Python-2.1.0_GH0.tar.gz) = 1f0326b5e92212c1ed81f5e387438e73ff61154ea2194656f4dc366d2314554e
+SIZE (GeoIP2-Python-2.1.0_GH0.tar.gz) = 28215
diff --git a/net/py-GeoIP2/pkg-descr b/net/py-GeoIP2/pkg-descr
new file mode 100644
index 000000000000..c6cd5c718e73
--- /dev/null
+++ b/net/py-GeoIP2/pkg-descr
@@ -0,0 +1,4 @@
+Python API to the GeoIP2 library for obtaining the country, region, city,
+latitude, and longitude of any IP address.
+
+WWW: https://github.com/maxmind/GeoIP2-python