git: 47b1de321842 - main - www/nginx-module-geoip2: Add New Port

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Tue, 20 Oct 2026 17:43:50 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=47b1de321842a71bc975a623ed1f9b47128d3e9c

commit 47b1de321842a71bc975a623ed1f9b47128d3e9c
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-20 17:41:02 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-20 17:43:29 +0000

    www/nginx-module-geoip2: Add New Port
    
    Sources of the geoip2 module for the NGINX ports.  The module reads a MaxMind
    database and puts what it finds for an address into variables.
    
    Sponsored by:   Netzkommune GmbH
---
 www/Makefile                                 |  1 +
 www/nginx-module-geoip2/Makefile             | 36 ++++++++++++++++++++++++++++
 www/nginx-module-geoip2/distinfo             |  3 +++
 www/nginx-module-geoip2/files/pkg-message.in | 14 +++++++++++
 www/nginx-module-geoip2/pkg-descr            |  7 ++++++
 5 files changed, 61 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 000faf343576..14a63d1adcc1 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -547,6 +547,7 @@
     SUBDIR += nginx-module-fancyindex
     SUBDIR += nginx-module-fips-check
     SUBDIR += nginx-module-form-input
+    SUBDIR += nginx-module-geoip2
     SUBDIR += nginx-module-gridfs
     SUBDIR += nginx-module-iconv
     SUBDIR += nginx-module-json-status
diff --git a/www/nginx-module-geoip2/Makefile b/www/nginx-module-geoip2/Makefile
new file mode 100644
index 000000000000..7d226992a0b6
--- /dev/null
+++ b/www/nginx-module-geoip2/Makefile
@@ -0,0 +1,36 @@
+PORTNAME=	nginx-module-geoip2
+DISTVERSION=	3.4.20240402
+CATEGORIES=	www
+
+MAINTAINER=	joneum@FreeBSD.org
+COMMENT=	Sources of the geoip2 modules for the NGINX ports
+WWW=		https://github.com/leev/ngx_http_geoip2_module
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	leev
+GH_PROJECT=	ngx_http_geoip2_module
+GH_TAGNAME=	445df24
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+SUB_FILES=	pkg-message
+
+_MODDIR=	share/nginx/modules/${PORTNAME}
+MODULESDIR=	${PREFIX}/${_MODDIR}
+
+_MODFILES=	ngx_http_geoip2_module.c \
+		ngx_stream_geoip2_module.c
+
+PLIST_FILES=	${_MODDIR}/config \
+		${_MODFILES:S!^!${_MODDIR}/!}
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${MODULESDIR}
+	${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}${MODULESDIR}
+	${INSTALL_DATA} ${_MODFILES:S!^!${WRKSRC}/!} ${STAGEDIR}${MODULESDIR}
+
+.include <bsd.port.mk>
diff --git a/www/nginx-module-geoip2/distinfo b/www/nginx-module-geoip2/distinfo
new file mode 100644
index 000000000000..75674d252546
--- /dev/null
+++ b/www/nginx-module-geoip2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1792437058
+SHA256 (leev-ngx_http_geoip2_module-3.4.20240402-445df24_GH0.tar.gz) = f19985b13e4095168a60aab5a1b29940ff586bf7571c61aa70ca7cd2f807850c
+SIZE (leev-ngx_http_geoip2_module-3.4.20240402-445df24_GH0.tar.gz) = 8889
diff --git a/www/nginx-module-geoip2/files/pkg-message.in b/www/nginx-module-geoip2/files/pkg-message.in
new file mode 100644
index 000000000000..b384dd62dfd8
--- /dev/null
+++ b/www/nginx-module-geoip2/files/pkg-message.in
@@ -0,0 +1,14 @@
+[
+{ type: install
+  message: <<EOM
+This package contains the sources of the geoip2 module only.  It does not
+install a loadable module.
+
+The module itself is built by the nginx ports.  To use it, build www/nginx,
+www/nginx-devel or www/freenginx with the HTTP_GEOIP2 option enabled.
+Those ports pick the sources up from
+%%PREFIX%%/share/nginx/modules/nginx-module-geoip2
+and produce ngx_http_geoip2_module.so and ngx_stream_geoip2_module.so.
+EOM
+}
+]
diff --git a/www/nginx-module-geoip2/pkg-descr b/www/nginx-module-geoip2/pkg-descr
new file mode 100644
index 000000000000..f1e6148cabf2
--- /dev/null
+++ b/www/nginx-module-geoip2/pkg-descr
@@ -0,0 +1,7 @@
+The geoip2 modules look an address up in a MaxMind DB file and put the
+result into nginx variables -- country, city, subdivision, whatever the
+database carries.  One module serves the http subsystem, the other the
+stream subsystem.
+
+This port only installs the module sources.  The module itself is built by
+the nginx ports when their HTTP_GEOIP2 option is enabled.