Skip to content

Commit

Permalink
Add ngx_http_redis and headers-more-nginx-module modules
Browse files Browse the repository at this point in the history
headers-more-nginx-module is used for settring a header and ngx_http_redis is used for http caching
  • Loading branch information
jsnjack committed Jan 30, 2024
1 parent c51e10a commit d54a7cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nginx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
%global lua_resty_lrucache_version 0.13
%global ngx_devel_kit_version 0.3.3
%global luajit2_version 2.1-20231117
%global ngx_http_redis_version 0.4.1-cmm
%global headers_more_version 0.37

# By default downloading of sources is disabled
%undefine _disable_source_fetch
Expand All @@ -27,6 +29,8 @@ Source101: https://github.com/openresty/luajit2/archive/refs/tags/v%{luajit2_ver
Source102: https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v%{ngx_devel_kit_version}.tar.gz
Source103: https://github.com/openresty/lua-resty-core/archive/refs/tags/v%{lua_resty_core_version}.tar.gz
Source104: https://github.com/openresty/lua-resty-lrucache/archive/refs/tags/v%{lua_resty_lrucache_version}.tar.gz
Source105: https://github.com/centminmod/ngx_http_redis/archive/refs/tags/%{ngx_http_redis_version}.tar.gz
Source106: https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v%{headers_more_version}.tar.gz

License: BSD
Group: System Environment/Daemons
Expand All @@ -52,6 +56,10 @@ tar -xzvf %{SOURCE103} -C %{_builddir}
%global SOURCE103 %{_builddir}/lua-resty-core-%{lua_resty_core_version}
tar -xzvf %{SOURCE104} -C %{_builddir}
%global SOURCE104 %{_builddir}/lua-resty-lrucache-%{lua_resty_lrucache_version}
tar -xzvf %{SOURCE105} -C %{_builddir}
%global SOURCE105 %{_builddir}/ngx_http_redis-%{ngx_http_redis_version}
tar -xzvf %{SOURCE106} -C %{_builddir}
%global SOURCE106 %{_builddir}/headers-more-nginx-module-%{headers_more_version}

# Build luajit
cd %{SOURCE101} && make && make install PREFIX=/usr DESTDIR=%{buildroot}/../luajit
Expand Down Expand Up @@ -95,8 +103,10 @@ nginx_ldopts="$RPM_LD_FLAGS -Wl,-E"
--with-threads \
--with-cc-opt="%{optflags} $(pcre2-config --cflags)" \
--with-ld-opt="$nginx_ldopts" \
--add-module=%{SOURCE100} \
--add-module=%{SOURCE102} \
--add-module=%{SOURCE100}
--add-module=%{SOURCE105} \
--add-module=%{SOURCE106}

%make_build

Expand Down

0 comments on commit d54a7cb

Please sign in to comment.