File nginx-mod-http-subs-filter.spec of Package nginx-mod-http-subs-filter

Name:           nginx-mod-http-subs-filter
Version:        0.6.4^20211228c6f825f
Release:        0
Summary:        Nginx regular expression and fixed string substitutions filter module

License:        BSD-2-Clause
URL:            https://github.com/yaoweibin/ngx_http_substitutions_filter_module
Source0:        %{name}-%{version}.tar.xz
Source1:        LICENSE

BuildRequires:  nginx-mod-devel

%description
nginx_substitutions_filter is a filter module which can do both regular
expression and fixed string substitutions on response bodies. This
module is quite different from the Nginx's native Substitution Module.
It scans the output chains buffer and matches string line by line, just
like Apache's mod_substitute
(<http://httpd.apache.org/docs/trunk/mod/mod_substitute.html>).

%prep
%autosetup
install %{SOURCE1} .

%build
%nginx_modconfigure
%nginx_modbuild

%install
pushd %{_vpath_builddir}
install -dm 0755 %{buildroot}%{nginx_moddir}
install -pm 0755 ngx_http_subs_filter_module.so %{buildroot}%{nginx_moddir}
install -dm 0755 %{buildroot}%{nginx_modconfdir}
echo 'load_module "%{nginx_moddir}/ngx_http_subs_filter_module.so";' \
    > %{buildroot}%{nginx_modconfdir}/mod-http-subs-filter.conf
popd

%files
%license LICENSE
%doc README
%{nginx_moddir}/ngx_http_subs_filter_module.so
%{nginx_modconfdir}/mod-http-subs-filter.conf

%changelog
openSUSE Build Service is sponsored by