Topic: php-brotli. download sources for build.
Please change "Source0" on link for dwonload sources.
diff --git a/php-brotli.spec b/php-brotli.spec
index 9ccca24..e3c6a50 100644
--- a/php-brotli.spec
+++ b/php-brotli.spec
@@ -32,6 +32,10 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
+%global google_brotli_version 1.0.6
+%global esaxx_gh_commit ca7cb332011ec37a8436487f210f396b84bd8273
+%global libdivsufsort_version 2.0.1
+
Summary: Brotli Extension for PHP
Name: %{?sub_prefix}php-%{pecl_name}
Version: 0.6.2
@@ -43,10 +47,18 @@ Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_V
License: MIT
Group: Development/Languages
URL: ht tps://github.com/%{gh_owner}/%{gh_project}
-Source0: %{pkg_name}-%{version}-%{gh_short}.tgz
+%if 0%{?gh_date:1}
+Source0: ht tps://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+%else
+Source0: ht tps://github.com/%{gh_owner}/%{gh_project}/archive/%{version}.tar.gz
+%endif
# retrieve a recursive git snapshot with submodule
Source1: makesrc.sh
+Source2: ht tps://github.com/google/brotli/archive/v%{google_brotli_version}.tar.gz
+Source3: ht tps://github.com/hillbig/esaxx/archive/%{esaxx_gh_commit}/esaxx-%{esaxx_gh_commit}.tar.gz
+Source4: ht tps://github.com/y-256/libdivsufsort/archive/%{libdivsufsort_version}.tar.gz
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
%if %{?with_libbrotli}
@@ -96,11 +108,22 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -qc
+%setup -qc -a 2 -a 3 -a 4
+%if 0%{?gh_date:1}
mv %{gh_project}-%{gh_commit} NTS
+%else
+mv %{gh_project}-%{version} NTS
+%endif
cd NTS
+rmdir ./brotli
+mv ../brotli-%{google_brotli_version} ./brotli
+rmdir ./brotli/research/esaxx
+rmdir ./brotli/research/libdivsufsort
+mv ../esaxx-%{esaxx_gh_commit} ./brotli/research/esaxx
+mv ../libdivsufsort-%{libdivsufsort_version} ./brotli/research/libdivsufsort
+
# replace symlink
rm LICENSE
mv brotli/LICENSE .