commit: 6d6aa08c89c87b0fde33043bc8d581f3df0e4411 Author: Zurab Kvachadze <zurabid2016 <AT> gmail <DOT> com> AuthorDate: Wed Feb 26 20:25:03 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jul 5 07:27:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d6aa08c
www-nginx/ngx-geoip2: new package, add 3.4 This commits separates ngx-geoip2, previously bundled with www-servers/nginx, into its own package. ngx-geoip2[1] allows creating "variables with values from the maxmind geoip2 databases". [1]: https://github.com/leev/ngx_http_geoip2_module Signed-off-by: Zurab Kvachadze <zurabid2016 <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/37590 Signed-off-by: Sam James <sam <AT> gentoo.org> www-nginx/ngx-geoip2/Manifest | 1 + www-nginx/ngx-geoip2/metadata.xml | 23 +++++++++++++++++++ www-nginx/ngx-geoip2/ngx-geoip2-3.4.ebuild | 36 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/www-nginx/ngx-geoip2/Manifest b/www-nginx/ngx-geoip2/Manifest new file mode 100644 index 000000000000..6c6ee101549c --- /dev/null +++ b/www-nginx/ngx-geoip2/Manifest @@ -0,0 +1 @@ +DIST ngx-geoip2-3.4.tar.gz 8877 BLAKE2B cd59ebbd2ca47f6af0b22b8b91768053d2c991f7adf19941625e3570d81dcb73989101795d641e4efce1eed37d454bca73d603b5d0e4511e3bd63100c7acf750 SHA512 18dea21e5ae2647bea1fc448058a1b773c936917245edef8d861d5e23ed92e9a3b1ec4ef43ffb2ece7b5899d787910adcf4fbd39f84d7e8d7c54759e2fee5b72 diff --git a/www-nginx/ngx-geoip2/metadata.xml b/www-nginx/ngx-geoip2/metadata.xml new file mode 100644 index 000000000000..19676ea3678f --- /dev/null +++ b/www-nginx/ngx-geoip2/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>[email protected]</email> + <name>Zurab Kvachadze</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>[email protected]</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + The ngx-geoip2 module creates variables with values from the maxmind GeoIP2 databases based + on the client IP (default) or from a specific variable (both IPv4 and IPv6 are supported). + + The module supports NGINX streams and can be used in the same way the HTTP module can be + used. + </longdescription> + <upstream> + <bugs-to>https://github.com/leev/ngx_http_geoip2_module/issues</bugs-to> + <remote-id type="github">leev/ngx_http_geoip2_module</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-nginx/ngx-geoip2/ngx-geoip2-3.4.ebuild b/www-nginx/ngx-geoip2/ngx-geoip2-3.4.ebuild new file mode 100644 index 000000000000..1e0b971977f6 --- /dev/null +++ b/www-nginx/ngx-geoip2/ngx-geoip2-3.4.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="ngx_http_geoip2_module" +NGINX_MOD_S="${WORKDIR}/${MY_PN}-${PV}" + +inherit nginx-module + +DESCRIPTION="NGINX GeoIP2 module" +HOMEPAGE="https://github.com/leev/ngx_http_geoip2_module" +SRC_URI=" + https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz +" + +LICENSE="BSD-2" +SLOT="0" + +DEPEND="dev-libs/libmaxminddb" +RDEPEND="${DEPEND}" + +src_configure() { + # Always build the stream module. + myconf=( --with-stream ) + nginx-module_src_configure "${myconf[@]}" +} + +pkg_postinst() { + nginx-module_pkg_postinst + + einfo "" + ewarn "If you want to use the stream module, make sure that www-servers/nginx" + ewarn "has USE=\"stream\" set. Please refer to the Gentoo AMD64 Handbook for" + ewarn "instructions on how to declare USE flags." +}
