diff options
Diffstat (limited to 'php-pecl-grpc.spec')
| -rw-r--r-- | php-pecl-grpc.spec | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec index 4f99598..256fe8a 100644 --- a/php-pecl-grpc.spec +++ b/php-pecl-grpc.spec @@ -20,22 +20,31 @@ %bcond_without openssl %global pecl_name grpc +%global pie_vend grpc +%global pie_proj grpc-php-ext %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini %global upstream_version 1.81.0 #global upstream_prever RC1 -%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} -%global _configure ../%{sources}/configure +# Github forge +%global gh_vend %{pie_vend} +%global gh_proj %{pie_proj} +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag v%{upstream_version}%{?upstream_prever} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{upstream_version}%{?upstream_prever} +%global _configure ../configure # Disable LTO (erratic crash during build) %define _lto_cflags %{nil} -Summary: General RPC framework Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist} +Summary: General RPC framework License: Apache-2.0 -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}.tgz +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 2%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} Patch0: %{pecl_name}-build.patch Patch2: %{pecl_name}-workaround.patch @@ -45,7 +54,6 @@ BuildRequires: make BuildRequires: %{?dtsprefix}gcc >= 7.0 BuildRequires: %{?dtsprefix}gcc-c++ BuildRequires: %{?scl_prefix}php-devel >= 7.0 -BuildRequires: %{?scl_prefix}php-pear BuildRequires: zlib-devel %if %{with openssl} BuildRequires: openssl-devel @@ -57,10 +65,15 @@ BuildRequires: openssl-devel-engine Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# Extension +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +# PECL +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# PIE +Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} +Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} %description @@ -74,14 +87,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -q -c - -# Don't install/register tests -sed -e 's/role="test"/role="src"/' \ - -e '/LICENSE/s/role="doc"/role="src"/' \ - -i package.xml +%forgesetup -cd %{sources} %patch -P0 -p1 -b .rpm %patch -P2 -p1 -b .nolog %if %{with openssl} @@ -97,7 +104,6 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 fi -cd .. mkdir NTS %if %{with_zts} @@ -120,12 +126,11 @@ EOF %build %{?dtsenable} -cd %{sources} %{__phpize} [ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL -cd ../NTS +cd NTS %configure \ --enable-grpc \ --with-openssl-dir=%{_root_prefix} \ @@ -154,20 +159,12 @@ cd ../ZTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -# Install XML package description -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml - %if %{with_zts} %make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Documentation -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done - %check : Minimal load test for NTS extension @@ -186,8 +183,9 @@ cd ../ZTS %files -%license %{sources}/LICENSE -%{pecl_xmldir}/%{name}.xml +%license LICENSE +%doc composer.json +%doc *.md %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -199,6 +197,11 @@ cd ../ZTS %changelog +* Fri Jun 26 2026 Remi Collet <remi@remirepo.net> - 1.81.0-2 +- drop pear/pecl dependency +- sources from github +- add pie virtual provides + * Tue Jun 2 2026 Remi Collet <remi@remirepo.net> - 1.81.0-1 - update to 1.81.0 |
