Mike L 9 місяців тому
батько
коміт
dafd251e66
1 змінених файлів з 13 додано та 4 видалено
  1. 13 4
      nginx-module-brotli.spec

+ 13 - 4
nginx-module-brotli.spec

@@ -1,3 +1,5 @@
+%define commit0 a71f931
+%define commit1 ed738e8
 #
 %define nginx_user nginx
 %define nginx_group nginx
@@ -51,7 +53,8 @@ BuildRequires: gcc
 BuildRequires: git
 BuildRequires: cmake
 
-%define base_version 1.25.3
+%define ngx_version 1.25.3
+%define base_version 1.0.0rc+git9.g%{commit0}
 %define base_release 1%{?dist}.ngx
 
 %define bdir %{_builddir}/%{name}-%{base_version}
@@ -65,15 +68,19 @@ URL: https://github.com/kuretru/nginx-module-brotli
 Group: %{_group}
 
 #!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
+#!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
 
 BuildRoot: %{_tmppath}/%{name}-%{base_version}-%{base_release}-root
 BuildRequires: zlib-devel
 BuildRequires: pcre2-devel
-Requires: nginx-r%{base_version}
+Requires: nginx-r%{ngx_version}
 Provides: %{name}-r%{base_version}
 
 %description
@@ -92,8 +99,10 @@ nginx Brotli dynamic modules.
 %prep
 %setup -qcTn %{name}-%{base_version}
 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/
+tar --strip-components=1 -zxf %{SOURCE3}
 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 --build . --config Release --target brotlienc