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 .

Re: php-brotli. download sources for build.

Please explain why needed ?

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php-brotli. download sources for build.

Notice: you can also send patch by mail in git format-patch format

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php-brotli. download sources for build.

When building RPM packages into my repository, I just run make and the package is built. For php-brotli you have to separately download the source with all dependencies and create tar.

My changes make it easy to run make command and the RPM package builds.

Re: php-brotli. download sources for build.

There is half of the packages in my repo which use the "makesrc.sh" way, often because of partial export from git (.gitattributes)

Sorry, but I don't think this is a real improvement.
The recursive git snapshot is working as expected

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test