# Build against OpenSSL 3 on EL8 %if 0%{?rhel} == 8 %global openssl_pkgversion 3 %endif Summary: GeoIP2 module for nginx Name: nginx-mod-geoip2 Version: 3.4 Release: 1%{?dist} Vendor: Artera URL: https://github.com/leev/ngx_http_geoip2_module %define _modname geoip2 %define _nginxver 1.24.0 %define nginx_config_dir %{_sysconfdir}/nginx %define nginx_build_dir %{_builddir}/nginx-%{_nginxver} Source0: https://nginx.org/download/nginx-%{_nginxver}.tar.gz Source1: https://github.com/leev/ngx_http_geoip2_module/archive/%{version}/%{_modname}-%{version}.tar.gz Requires: nginx = 1:%{_nginxver} Requires: libmaxminddb BuildRequires: nginx BuildRequires: libtool BuildRequires: autoconf BuildRequires: automake BuildRequires: openssl%{?openssl_pkgversion}-devel BuildRequires: pcre2-devel BuildRequires: zlib-devel BuildRequires: perl-devel BuildRequires: gd-devel BuildRequires: libmaxminddb-devel BuildRequires: libxslt-devel BuildRequires: perl-devel BuildRequires: perl(ExtUtils::Embed) BuildRequires: gperftools-devel License: BSD BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description GeoIP2 module for nginx. %prep %setup -q -n nginx-%{_nginxver} %setup -T -D -b 1 -n ngx_http_%{_modname}_module-%{version} %build cd %{_builddir}/nginx-%{_nginxver} ./configure --with-compat --add-dynamic-module=../ngx_http_%{_modname}_module-%{version} make modules %install %{__rm} -rf %{buildroot} %{__install} -Dm755 %{nginx_build_dir}/objs/ngx_http_%{_modname}_module.so \ $RPM_BUILD_ROOT%{_libdir}/nginx/modules/ngx_http_%{_modname}_module.so %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root) %{_libdir}/nginx/modules/*.so