forked from rpms/nginx
Update geoip to geoip2
This commit is contained in:
parent
1597e23fa5
commit
9e2d2411c8
@ -1 +1,2 @@
|
||||
6b4ab4eff3c617e133819f43fdfc14708e593a79 SOURCES/nginx-1.20.1.tar.gz
|
||||
9b0fa43e2935e350d70681be4420b7983540eebd SOURCES/ngx_http_geoip2_module-3.4.tar
|
@ -40,6 +40,7 @@ License: BSD
|
||||
URL: http://nginx.org/
|
||||
|
||||
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
|
||||
Source1: https://github.com/leev/ngx_http_geoip2_module/archive/refs/tags/3.4.tar.gz
|
||||
Source10: nginx.service
|
||||
Source11: nginx.logrotate
|
||||
Source12: nginx.conf
|
||||
@ -138,14 +139,14 @@ for the Nginx server including the correct permissions for the
|
||||
directories.
|
||||
|
||||
%if %{with geoip}
|
||||
%package mod-http-geoip
|
||||
%package mod-http-geoip2
|
||||
Group: System Environment/Daemons
|
||||
Summary: Nginx HTTP geoip module
|
||||
BuildRequires: GeoIP-devel
|
||||
Requires: nginx(abi) = %{nginx_abiversion}
|
||||
Requires: GeoIP
|
||||
|
||||
%description mod-http-geoip
|
||||
%description mod-http-geoip2
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
@ -223,7 +224,7 @@ Requires: zlib-devel
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -T -a 1
|
||||
%patch0 -p0
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
@ -277,7 +278,8 @@ export DESTDIR=%{buildroot}
|
||||
--with-http_xslt_module=dynamic \
|
||||
--with-http_image_filter_module=dynamic \
|
||||
%if %{with geoip}
|
||||
--with-http_geoip_module=dynamic \
|
||||
--add-dynamic-module=%{builddir}/ngx_http_geoip2_module-3.4
|
||||
# --with-http_geoip_module=dynamic \
|
||||
%endif
|
||||
--with-http_sub_module \
|
||||
--with-http_dav_module \
|
||||
@ -370,8 +372,8 @@ for i in ftdetect indent syntax; do
|
||||
done
|
||||
|
||||
%if %{with geoip}
|
||||
echo 'load_module "%{nginx_moduledir}/ngx_http_geoip_module.so";' \
|
||||
> %{buildroot}%{nginx_moduleconfdir}/mod-http-geoip.conf
|
||||
echo 'load_module "%{nginx_moduledir}/ngx_http_geoip2_module.so";' \
|
||||
> %{buildroot}%{nginx_moduleconfdir}/mod-http-geoip2.conf
|
||||
%endif
|
||||
echo 'load_module "%{nginx_moduledir}/ngx_http_image_filter_module.so";' \
|
||||
> %{buildroot}%{nginx_moduleconfdir}/mod-http-image-filter.conf
|
||||
@ -411,7 +413,7 @@ exit 0
|
||||
%systemd_post nginx.service
|
||||
|
||||
%if %{with geoip}
|
||||
%post mod-http-geoip
|
||||
%post mod-http-geoip2
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
@ -503,9 +505,9 @@ fi
|
||||
%dir %{_unitdir}/nginx.service.d
|
||||
|
||||
%if %{with geoip}
|
||||
%files mod-http-geoip
|
||||
%{nginx_moduleconfdir}/mod-http-geoip.conf
|
||||
%{nginx_moduledir}/ngx_http_geoip_module.so
|
||||
%files mod-http-geoip2
|
||||
%{nginx_moduleconfdir}/mod-http-geoip2.conf
|
||||
%{nginx_moduledir}/ngx_http_geoip2_module.so
|
||||
%endif
|
||||
|
||||
%files mod-http-image-filter
|
||||
@ -539,6 +541,9 @@ fi
|
||||
%{nginx_srcdir}/
|
||||
|
||||
%changelog
|
||||
* Fri Jul 15 2022 Eduard Abdullin <eabdullin@almalinux.org> - 1:1.20.1-1.alma.1
|
||||
- Update geoip to geoip2
|
||||
|
||||
* Mon Jan 31 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 1:1.20.1-1.alma
|
||||
- Debrand for AlmaLinux
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user