aboutsummaryrefslogtreecommitdiff
path: root/net/nginx/Makefile
diff options
context:
space:
mode:
authorJavier Marcet <javier@marcet.info>2023-06-30 16:21:19 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-07-05 20:54:44 +0200
commit659fe23a90510a98c09c0d34cb4f6113744beac1 (patch)
tree3e54f63081dc829e49cf2aad92e70b1b4385cb87 /net/nginx/Makefile
parent78cbb0153b12c5630eb5c92967a8cadf134a67df (diff)
nginx: add support for MaxMind GeoIP2 databases
Signed-off-by: Javier Marcet <javier@marcet.info>
Diffstat (limited to 'net/nginx/Makefile')
-rw-r--r--net/nginx/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/nginx/Makefile b/net/nginx/Makefile
index 56b9cc382..2937c96ce 100644
--- a/net/nginx/Makefile
+++ b/net/nginx/Makefile
@@ -27,6 +27,7 @@ PKG_BUILD_FLAGS:=gc-sections
# 3rd-party modules
PKG_MOD_EXTRA := \
+ geoip2 \
lua \
rtmp \
dav-ext \
@@ -198,6 +199,13 @@ define Package/nginx-mod-luci/install
$(INSTALL_BIN) ./files-luci-support/60_nginx-luci-support $(1)/etc/uci-defaults/60_nginx-luci-support
endef
+define Download/nginx-mod-geoip2
+ VERSION:=1cabd8a1f68ea3998f94e9f3504431970f848fbf
+ URL:=https://github.com/leev/ngx_http_geoip2_module.git
+ MIRROR_HASH:=b4bd8517f6595f28e9cea5370045df476e0f7fa9ca3611d71ba85c518f1a7eda
+ PROTO:=git
+endef
+
define Download/nginx-mod-headers-more
VERSION:=bea1be3bbf6af28f6aa8cf0c01c07ee1637e2bd0
URL:=https://github.com/openresty/headers-more-nginx-module.git
@@ -423,6 +431,8 @@ $(eval $(call BuildModule,brotli,,ngx_http_brotli_filter ngx_http_brotli_static,
Add support for brotli compression module.))
$(eval $(call BuildModule,naxsi,,ngx_http_naxsi, \
Enable NAXSI module.))
+$(eval $(call BuildModule,geoip2,+@NGINX_STREAM_CORE_MODULE +libmaxminddb,ngx_http_geoip2 ngx_stream_geoip2, \
+ Enable MaxMind GeoIP2 module.))
# TODO: remove after a transition period (together with pkg nginx-util):
# It is for smoothly substituting nginx and nginx-mod-luci-ssl (by nginx-ssl