diff options
Diffstat (limited to 'php-pecl-protobuf.spec')
| -rw-r--r-- | php-pecl-protobuf.spec | 86 |
1 files changed, 45 insertions, 41 deletions
diff --git a/php-pecl-protobuf.spec b/php-pecl-protobuf.spec index 17595e6..2e103e2 100644 --- a/php-pecl-protobuf.spec +++ b/php-pecl-protobuf.spec @@ -1,44 +1,56 @@ # remirepo spec file for php-pecl-protobuf # -# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2016-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%{?scl:%scl_package php-pecl-protobuf} +%{?scl:%scl_package php-pecl-protobuf} + +%global pecl_name protobuf +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global ini_name 40-%{pecl_name}.ini +%global library_version 25.9 +%global upstream_version 3.%{library_version} +#global upstream_prever RC1 +%global sources php/ext/google/protobuf +%global _configure ../%{sources}/configure + +# Github forge +%global gh_vend protocolbuffers +%global gh_proj protobuf +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +%global tag v%{library_version}%{?upstream_prever} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{library_version}%{?upstream_prever} -%global pecl_name protobuf -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global ini_name 40-%{pecl_name}.ini -%global upstream_version 3.25.8 -#global upstream_prever RC2 -%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} -%global _configure ../%{sources}/configure - -Summary: Mechanism for serializing structured data Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Summary: Mechanism for serializing structured data # protobuf extension is BSD # third_party/utf8_range is MIT License: BSD-3-Clause and MIT -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 8.0 -BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +# 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} +# No PIE for now %description @@ -51,23 +63,19 @@ 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 '/utf8_range/s/role="doc"/role="src"/' \ - -e '/LICENSE/s/role="doc"/role="src"/' \ - -i package.xml - -cd %{sources} +%forgesetup cp third_party/utf8_range/LICENSE LICENSE.utf8_range +pushd %{sources} +ln -s ../../../../third_party + # Sanity check, really often broken extver=$(sed -n '/#define PHP_PROTOBUF_VERSION/{s/.* "//;s/".*$//;p}' protobuf.h) 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 .. +popd mkdir NTS %if %{with_zts} @@ -87,14 +95,16 @@ EOF %build %{?dtsenable} -cd %{sources} +pushd %{sources} %{__phpize} sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global +popd -cd ../NTS +cd NTS %configure \ --enable-protobuf \ --with-php-config=%{__phpconfig} + %make_build %if %{with_zts} @@ -102,9 +112,11 @@ cd ../ZTS %configure \ --enable-protobuf \ --with-php-config=%{__ztsphpconfig} + %make_build %endif + %install %{?dtsenable} @@ -118,18 +130,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Install the package XML file -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml - -# Test & Documentation -cd %{sources} -for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done -for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i -done - %check : Minimal load test for NTS extension @@ -147,8 +147,7 @@ done %files -%license %{sources}/LICENSE* -%{pecl_xmldir}/%{name}.xml +%license LICENSE* %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -160,6 +159,11 @@ done %changelog +* Thu Mar 26 2026 Remi Collet <remi@remirepo.net> - 3.25.9-1 +- update to 3.25.9 (no change) +- drop pear/pecl dependency +- sources from github + * Wed May 28 2025 Remi Collet <remi@remirepo.net> - 3.25.8-1 - update to 3.25.8 (no change) |
