%global shortname naxsi Name: nginx-mod-naxsi Version: 1.3 Release: 1%{?dist} Summary: nginx web application firewall module License: GPLv3 URL: https://github.com/nbs-system/naxsi Source0: %{url}/archive/%{version}/%{shortname}-%{version}.tar.gz BuildRequires: gcc BuildRequires: nginx-mod-devel %description naxsi is an nginx module that provides score based Web Application Firewall (WAF) abilities in a highly granular fashion. %prep %autosetup -n %{shortname}-%{version} %build pushd naxsi_src %nginx_modconfigure %nginx_modbuild popd %install pushd naxsi_src/%{_vpath_builddir} install -dm 0755 %{buildroot}%{nginx_moddir} install -pm0755 ngx_http_naxsi_module.so %{buildroot}%{nginx_moddir} popd install -dm 0755 %{buildroot}%{nginx_modconfdir} echo 'load_module "%{nginx_moddir}/ngx_http_naxsi_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-naxsi-web-app-firewall.conf install -dm 0755 %{buildroot}%{_datadir}/nginx/naxsi install -m0755 naxsi_config/naxsi_core.rules %{buildroot}%{_datadir}/nginx/naxsi/ %files %license LICENSE %doc README.md %{nginx_moddir}/ngx_http_naxsi_module.so %{nginx_modconfdir}/mod-naxsi-web-app-firewall.conf %{_datadir}/nginx/naxsi/ %changelog * Tue Aug 03 2021 Neal Gompa - 1.3-1 - Initial packaging