|
@@ -2,7 +2,7 @@
|
|
|
%define nginx_user nginx
|
|
|
%define nginx_group nginx
|
|
|
|
|
|
-%if 0%{?rhel} || 0%{?amzn}
|
|
|
+%if 0%{?rhel} || 0%{?amzn} || 0%{?fedora}
|
|
|
%define _group System Environment/Daemons
|
|
|
BuildRequires: openssl-devel
|
|
|
%endif
|
|
@@ -25,29 +25,34 @@ Epoch: %{epoch}
|
|
|
%define _debugsource_template %{nil}
|
|
|
%endif
|
|
|
|
|
|
-%define main_version 1.17.10
|
|
|
-%define main_release 1%{?dist}.ngx
|
|
|
+%if 0%{?fedora}
|
|
|
+%define _debugsource_template %{nil}
|
|
|
+%global _hardened_build 1
|
|
|
+%endif
|
|
|
+
|
|
|
+%define base_version 1.19.0
|
|
|
+%define base_release 1%{?dist}.ngx
|
|
|
|
|
|
-%define bdir %{_builddir}/%{name}-%{main_version}
|
|
|
+%define bdir %{_builddir}/%{name}-%{base_version}
|
|
|
|
|
|
Summary: nginx Brotli dynamic modules
|
|
|
Name: nginx-module-brotli
|
|
|
-Version: %{main_version}
|
|
|
-Release: %{main_release}
|
|
|
+Version: %{base_version}
|
|
|
+Release: %{base_release}
|
|
|
Vendor: Eugene Wu <kuretru@gmail.com>
|
|
|
URL: https://github.com/kuretru/nginx-module-brotli
|
|
|
Group: %{_group}
|
|
|
|
|
|
-Source0: https://nginx.org/download/nginx-%{main_version}.tar.gz
|
|
|
+Source0: https://nginx.org/download/nginx-%{base_version}.tar.gz
|
|
|
Source1: COPYRIGHT
|
|
|
Source2: ngx_brotli-1.0.7.tar.gz
|
|
|
|
|
|
License: 2-clause BSD-like license
|
|
|
|
|
|
-BuildRoot: %{_tmppath}/%{name}-%{main_version}-%{main_release}-root
|
|
|
+BuildRoot: %{_tmppath}/%{name}-%{base_version}-%{base_release}-root
|
|
|
BuildRequires: zlib-devel
|
|
|
BuildRequires: pcre-devel
|
|
|
-Requires: nginx == %{?epoch:%{epoch}:}%{main_version}-%{main_release}
|
|
|
+Requires: nginx == %{?epoch:%{epoch}:}%{base_version}-%{base_release}
|
|
|
|
|
|
%description
|
|
|
nginx Brotli dynamic modules.
|
|
@@ -63,25 +68,27 @@ nginx Brotli dynamic modules.
|
|
|
%define MODULE_CONFIGURE_ARGS $(echo "--add-dynamic-module=./ngx_brotli/")
|
|
|
|
|
|
%prep
|
|
|
-%setup -qcTn %{name}-%{main_version}
|
|
|
+%setup -qcTn %{name}-%{base_version}
|
|
|
tar --strip-components=1 -zxf %{SOURCE0}
|
|
|
tar -zxf %{SOURCE2}
|
|
|
|
|
|
%build
|
|
|
|
|
|
cd %{bdir}
|
|
|
+
|
|
|
./configure %{BASE_CONFIGURE_ARGS} %{MODULE_CONFIGURE_ARGS} \
|
|
|
- --with-cc-opt="%{WITH_CC_OPT}" \
|
|
|
- --with-ld-opt="%{WITH_LD_OPT}" \
|
|
|
+ --with-cc-opt="%{WITH_CC_OPT} " \
|
|
|
+ --with-ld-opt="%{WITH_LD_OPT} " \
|
|
|
--with-debug
|
|
|
make %{?_smp_mflags} modules
|
|
|
for so in `find %{bdir}/objs/ -type f -name "*.so"`; do
|
|
|
debugso=`echo $so | sed -e "s|.so|-debug.so|"`
|
|
|
mv $so $debugso
|
|
|
done
|
|
|
+
|
|
|
./configure %{BASE_CONFIGURE_ARGS} %{MODULE_CONFIGURE_ARGS} \
|
|
|
- --with-cc-opt="%{WITH_CC_OPT}" \
|
|
|
- --with-ld-opt="%{WITH_LD_OPT}"
|
|
|
+ --with-cc-opt="%{WITH_CC_OPT} " \
|
|
|
+ --with-ld-opt="%{WITH_LD_OPT} "
|
|
|
make %{?_smp_mflags} modules
|
|
|
|
|
|
%install
|
|
@@ -123,14 +130,14 @@ if [ $1 -eq 1 ]; then
|
|
|
cat <<BANNER
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
|
-The Brotli dynamic modules for nginx have been installed.
|
|
|
-To enable these modules, add the following to /etc/nginx/nginx.conf
|
|
|
+The Brotli dynamic module for nginx has been installed.
|
|
|
+To enable this module, add the following to /etc/nginx/nginx.conf
|
|
|
and reload nginx:
|
|
|
|
|
|
load_module modules/ngx_http_brotli_filter_module.so;
|
|
|
load_module modules/ngx_http_brotli_static_module.so;
|
|
|
|
|
|
-Please refer to the modules documentation for further details:
|
|
|
+Please refer to the module documentation for further details:
|
|
|
https://github.com/google/ngx_brotli
|
|
|
https://github.com/google/brotli
|
|
|
|
|
@@ -139,6 +146,9 @@ BANNER
|
|
|
fi
|
|
|
|
|
|
%changelog
|
|
|
+* Wed May 27 2020 Eugene Wu <kuretru@gmail.com>
|
|
|
+- base version updated to 1.19.0
|
|
|
+
|
|
|
* Sat Apr 18 2020 Eugene Wu <kuretru@gmail.com>
|
|
|
- base version updated to 1.17.10
|
|
|
|