|
@@ -1,3 +1,5 @@
|
|
|
|
+%define commit0 a71f931
|
|
|
|
+%define commit1 ed738e8
|
|
#
|
|
#
|
|
%define nginx_user nginx
|
|
%define nginx_user nginx
|
|
%define nginx_group nginx
|
|
%define nginx_group nginx
|
|
@@ -51,7 +53,8 @@ BuildRequires: gcc
|
|
BuildRequires: git
|
|
BuildRequires: git
|
|
BuildRequires: cmake
|
|
BuildRequires: cmake
|
|
|
|
|
|
-%define base_version 1.25.3
|
|
|
|
|
|
+%define ngx_version
|
|
|
|
+%define base_version 1.0.0rc+git9.g%{commit0}
|
|
%define base_release 1%{?dist}.ngx
|
|
%define base_release 1%{?dist}.ngx
|
|
|
|
|
|
%define bdir %{_builddir}/%{name}-%{base_version}
|
|
%define bdir %{_builddir}/%{name}-%{base_version}
|
|
@@ -65,8 +68,12 @@ URL: https://github.com/kuretru/nginx-module-brotli
|
|
Group: %{_group}
|
|
Group: %{_group}
|
|
|
|
|
|
#!RemoteAsset: sha256:64c5b975ca287939e828303fa857d22f142b251f17808dfe41733512d9cded86
|
|
#!RemoteAsset: sha256:64c5b975ca287939e828303fa857d22f142b251f17808dfe41733512d9cded86
|
|
-Source0: https://nginx.org/download/nginx-%{base_version}.tar.gz
|
|
|
|
|
|
+Source0: https://nginx.org/download/nginx-%{ngx_version}.tar.gz
|
|
Source1: COPYRIGHT
|
|
Source1: COPYRIGHT
|
|
|
|
+#!RemoteAsset: sha256:1d21be34f3b7b6d05a8142945e59b3a47665edcdfe0f3ee3d3dbef121f90c08c
|
|
|
|
+Source2: https://github.com/google/ngx_brotli/archive/%{commit0}.tar.gz
|
|
|
|
+#!RemoteAsset: sha256:aaa739962a45b508b2e783b915e6b2b57ed3b12bd4b0feac73acfb144dffa54f
|
|
|
|
+Source3: https://github.com/google/brotli/archive/%{commit1}.tar.gz
|
|
|
|
|
|
License: 2-clause BSD-like license
|
|
License: 2-clause BSD-like license
|
|
|
|
|
|
@@ -92,8 +99,10 @@ nginx Brotli dynamic modules.
|
|
%prep
|
|
%prep
|
|
%setup -qcTn %{name}-%{base_version}
|
|
%setup -qcTn %{name}-%{base_version}
|
|
tar --strip-components=1 -zxf %{SOURCE0}
|
|
tar --strip-components=1 -zxf %{SOURCE0}
|
|
-git clone --recursive https://github.com/google/ngx_brotli.git
|
|
|
|
|
|
+mkdir ngx_brotli
|
|
|
|
+tar --strip-components=1 -zxf %{SOURCE2} -C ngx_brotli
|
|
cd ngx_brotli/deps/brotli/
|
|
cd ngx_brotli/deps/brotli/
|
|
|
|
+tar --strip-components=1 -zxf %{SOURCE3}
|
|
mkdir out && cd out/
|
|
mkdir out && cd out/
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_INSTALL_PREFIX=./installed ..
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_INSTALL_PREFIX=./installed ..
|
|
cmake --build . --config Release --target brotlienc
|
|
cmake --build . --config Release --target brotlienc
|