%global orig_name ngx_http_geoip2_module %global nginx_version 2:1.28.2 Name: nginx-mod-geoip2 Version: 3.4 Release: 1%{?dist} Summary: GeoIP2 nginx module License: BSD-2 Clause URL: https://github.com/leev/ngx_http_geoip2_module Source: %{url}/archive/refs/tags/%{orig_name}-%{version}.tar.gz # https://github.com/leev/ngx_http_geoip2_module/pull/135 Patch: 135.patch BuildRequires: gcc BuildRequires: nginx-mod-devel = %{nginx_version} BuildRequires: libmaxminddb-devel BuildRequires: pcre2-devel BuildRequires: zlib-ng-devel Requires: nginx-filesystem = %{nginx_version} Requires: libmaxminddb %description ngx_http_geoip2_module - creates variables with values from the maxmind geoip2 databases based on the client IP (default) or from a specific variable (supports both IPv4 and IPv6) The module now supports nginx streams and can be used in the same way the http module can be used. %prep %autosetup -p1 -n %{orig_name}-%{version} %build %nginx_modconfigure %nginx_modbuild %install pushd %{_vpath_builddir} install -dm 0755 %{buildroot}%{nginx_moddir} install -pm 0755 ngx_http_geoip2_module.so %{buildroot}%{nginx_moddir} install -dm 0755 %{buildroot}%{nginx_modconfdir} echo 'load_module "%{nginx_moddir}/ngx_http_geoip2_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-ngx_http_geoip2_module.conf popd install -dm 0755 %{buildroot}%{_sysconfdir}/nginx/conf.d/ %files %license LICENSE %doc README.md %{nginx_moddir}/ngx_http_geoip2_module.so %{nginx_modconfdir}/mod-ngx_http_geoip2_module.conf %changelog * Mon Mar 02 2026 Patrick Laimbock - 3.4-1 - initial release of version 3.4 - add PR from https://github.com/leev/ngx_http_geoip2_module/pull/135 - based on https://copr.fedorainfracloud.org/coprs/fperget/ngx_http_geoip2_module/