File nginx-module-http-substitutions-filter.spec of Package nginx-module-http-substitutions-filter

#
# spec file for package nginx-module-http-substitutions-filter
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define project_name ngx_http_substitutions_filter_module
Name:           nginx-module-http-substitutions-filter
Version:        0.6.4+git.20211228
Release:        0
Summary:        Regular expression and fixed string substitutions nginx filter module
License:        BSD-2-Clause
Group:          Productivity/Networking/Web/Proxy
URL:            https://github.com/yaoweibin/%{project_name}
Source0:        %{name}-%{version}.tar.xz
Source1:        LICENSE
BuildRequires:  nginx-source
%{ngx_conditionals}
%{ngx_requires}

%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

%prep
mkdir %{name}
tar -xf %{SOURCE0} --strip-components=1 -C %{name}
cp -r %{_prefix}/src/nginx .
cp %{SOURCE1} .

%build
cd nginx
%{ngx_configure} --add-dynamic-module=../%{name}
%make_build modules

%install
mkdir -p %{buildroot}%{ngx_module_dir}
install -Dpm0644 nginx/objs/ngx_http_subs_filter_module.so %{buildroot}%{ngx_module_dir}

%files
%license LICENSE
%{ngx_module_dir}/ngx_http_subs_filter_module.so

%changelog
openSUSE Build Service is sponsored by