Nw fancyindex module
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
%global with_ldap_module 1
|
||||
%global with_modsecurity_module 0
|
||||
%global with_vts_module 1
|
||||
%global with_fancyindex 1
|
||||
%global modsecver 3.0.2
|
||||
%global vtsversion 0.2.1
|
||||
%global fancyversion 0.5.2
|
||||
|
||||
# gperftools exist only on selected arches
|
||||
%ifnarch s390 s390x
|
||||
@@ -20,7 +22,7 @@
|
||||
Name: nginx
|
||||
Epoch: 1
|
||||
Version: 1.22.1
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
|
||||
Summary: A high performance web server and reverse proxy server
|
||||
Group: System Environment/Daemons
|
||||
@@ -36,6 +38,7 @@ Source3: modsecurity.conf
|
||||
Source4: main.conf
|
||||
Source5: rules.conf
|
||||
Source6: nginx-module-vts-%{vtsversion}.tar.gz
|
||||
Source7: ngx-fancyindex-%{fancyversion}.tar.gz
|
||||
Source10: nginx.service
|
||||
Source11: nginx.logrotate
|
||||
Source12: nginx.conf
|
||||
@@ -100,6 +103,7 @@ Requires: nginx-mod-stream = %{epoch}:%{version}-%{release}
|
||||
Requires: nginx-mod-auth-ldap = %{epoch}:%{version}-%{release}
|
||||
Requires: nginx-mod-modsecurity = %{epoch}:%{version}-%{release}
|
||||
Requires: nginx-modules-vts = %{epoch}:%{version}-%{release}
|
||||
Requires: nginx-mod-fancyindex = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description all-modules
|
||||
%{summary}.
|
||||
@@ -203,6 +207,17 @@ BuildRequires: openldap-devel
|
||||
LDAP auth module for nginx
|
||||
%endif
|
||||
|
||||
%if 0%{?with_fancyindex}
|
||||
%package mod-fancyindex
|
||||
Group: System Environment/Daemons
|
||||
Summary: Nginx ldap fancy index module
|
||||
Requires: nginx
|
||||
|
||||
%description mod-fancyindex
|
||||
Fancy index module for nginx
|
||||
%endif
|
||||
|
||||
|
||||
%if 0%{?with_modsecurity_module}
|
||||
%package mod-security
|
||||
Group: System Environment/Daemons
|
||||
@@ -221,6 +236,9 @@ Modsecurity module for nginx
|
||||
%if 0%{?with_ldap_module}
|
||||
%setup -q -b 1 -n ngx_http_auth_ldap_module
|
||||
%endif
|
||||
%if 0%{?with_fancyindex}
|
||||
%setup -q -b 7 -n ngx-fancyindex-%{fancyversion}
|
||||
%endif
|
||||
%if 0%{?with_modsecurity_module}
|
||||
%setup -q -b 2 -n modsecurity-nginx-%{modsecver}
|
||||
%endif
|
||||
@@ -262,7 +280,6 @@ export DESTDIR=%{buildroot}
|
||||
%if 0%{?with_aio}
|
||||
--with-file-aio \
|
||||
%endif
|
||||
--with-ipv6 \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_realip_module \
|
||||
@@ -298,6 +315,9 @@ export DESTDIR=%{buildroot}
|
||||
%if 0%{?with_ldap_module}
|
||||
--add-dynamic-module=%{_builddir}/ngx_http_auth_ldap_module \
|
||||
%endif
|
||||
%if 0%{?with_fancyindex}
|
||||
--add-dynamic-module=../ngx-fancyindex-%{fancyversion} \
|
||||
%endif
|
||||
%if 0%{?with_modsecurity_module}
|
||||
--add-dynamic-module=%{_builddir}/modsecurity-nginx-%{modsecver} \
|
||||
--with-compat \
|
||||
@@ -337,6 +357,10 @@ install -m 0755 ./objs/ngx_http_auth_ldap_module.so %{buildroot}%{_libdir}/nginx
|
||||
install -p -D -m 0644 %{_builddir}/ngx_http_auth_ldap_module/example.conf %{buildroot}%{_defaultdocdir}/%{name}/auth_ldap_example.conf
|
||||
%endif
|
||||
|
||||
%if 0%{?with_fancyindex}
|
||||
install -m 0755 ./objs/ngx_http_fancyindex_module.so %{buildroot}%{_libdir}/nginx/modules/ngx_http_fancyindex_module.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_modsecurity_module}
|
||||
install -m 0755 ./objs/ngx_http_modsecurity_module.so %{buildroot}%{_libdir}/nginx/modules/ngx_http_modsecurity_module.so
|
||||
install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/nginx/modsec/modsecurity.conf
|
||||
@@ -391,6 +415,10 @@ echo 'load_module "%{_libdir}/nginx/modules/ngx_http_vhost_traffic_status_module
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_auth_ldap_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_auth-ldap.conf
|
||||
%endif
|
||||
%if 0%{?with_fancyindex}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_fancyindex_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/ngx_http_fancyindex_module.conf
|
||||
%endif
|
||||
%if 0%{?with_modsecurity_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_modsecurity_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_modsecurity.conf
|
||||
@@ -450,6 +478,13 @@ if [ $1 -eq 1 ]; then
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_fancyindex}
|
||||
%post mod-fancyindex
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_modsecurity_module}
|
||||
%post mod-security
|
||||
if [ $1 -eq 1 ]; then
|
||||
@@ -554,6 +589,12 @@ fi
|
||||
%{_defaultdocdir}/%{name}/auth_ldap_example.conf
|
||||
%endif
|
||||
|
||||
%if 0%{?with_fancyindex}
|
||||
%files mod-fancyindex
|
||||
%{_datadir}/nginx/modules/ngx_http_fancyindex_module.conf
|
||||
%{_libdir}/nginx/modules/ngx_http_fancyindex_module.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_modsecurity_module}
|
||||
%files mod-security
|
||||
%{_defaultdocdir}/%{name}-mod-security/*
|
||||
@@ -569,6 +610,9 @@ fi
|
||||
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
|
||||
|
||||
%changelog
|
||||
* Fri Nov 11 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- ngx_fancyindex module added.
|
||||
|
||||
* Sat Nov 5 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Nginx updated to 1.22.1 version.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user