#%global origname ngx_http_geoip2_module Name: nginx-mod-ngx_http_geoip2_module Version: 3.4 Release: %autorelease Summary: GeoIP2 nginx module License: BSD-2 Clause URL: https://github.com/leev/ngx_http_geoip2_module Source: %{url}/archive/refs/tags/%{version}.tar.gz BuildRequires: gcc BuildRequires: nginx-mod-devel BuildRequires: libmaxminddb-devel Requires: nginx-filesystem 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 -n nginx-mod-ngx_http_geoip2_module-%{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 %autochangelog