From 4632977d7e8b903a45ef697e9c9255401a7a7b21 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Oct 2024 09:58:41 +0200 Subject: update to 1.2.7 fix out of sources tree using patch from https://github.com/awslabs/aws-crt-php/pull/117 --- php-pecl-awscrt.spec | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'php-pecl-awscrt.spec') diff --git a/php-pecl-awscrt.spec b/php-pecl-awscrt.spec index 0f30c8d..8628bd5 100644 --- a/php-pecl-awscrt.spec +++ b/php-pecl-awscrt.spec @@ -20,17 +20,24 @@ Summary: AWS Common Runtime PHP bindings Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 1.2.6 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 1.2.7 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} # extension is Apache-2.0 -# see LICENSE* for rust libraries +# see LICENSE* and THIRD-PARTY-LICENSES.txt for bundled libraries +# ittapi, ittnotify.h: GPL-2.0-only OR BSD-3-Clause +# cJSON, libcbor: MIT License: Apache-2.0 AND MIT AND BSD-3-Clause URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{sources}.tgz +# use system nikic/php-parser +Patch0: %{pecl_name}-parser.patch +# Fix out of sources build +Patch1: %{pecl_name}-build.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 5.5 +BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-cli BuildRequires: %{?scl_prefix}php-pear BuildRequires: openssl-devel @@ -38,16 +45,19 @@ BuildRequires: openssl-devel BuildRequires: openssl-devel-engine %endif BuildRequires: cmake +BuildRequires: php-nikic-php-parser4 # List from config.m4 Provides: bundled(libaws-crt-ffi) Provides: bundled(libaws-c-auth) -Provides: bundled(libaws-c-http) -Provides: bundled(libaws-c-io) Provides: bundled(libaws-c-cal) +Provides: bundled(libaws-c-common) Provides: bundled(libaws-c-compression) +Provides: bundled(libaws-c-event-stream) +Provides: bundled(libaws-c-http) +Provides: bundled(libaws-c-io) +Provides: bundled(libaws-c-sdkutils) Provides: bundled(libaws-checksums) -Provides: bundled(libaws-c-common) Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -72,13 +82,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ -e 's/role="doc"/role="src"/' \ - %{!?_licensedir:-e '/LICENSE/s/role="src"/role="doc"/' } \ -e '/"CODE_OF_CONDUCT.md"/s/role="src"/role="doc"/'\ -e '/"CONTRIBUTING.md"/s/role="src"/role="doc"/'\ -e '/"README.md"/s/role="src"/role="doc"/'\ -i package.xml pushd %{sources} +%patch -P0 -p1 -b .phpparser +%patch -P1 -p1 -b .fixbuild + # Parallel build sed -e '/(CMAKE_BUILD)/s/$/ --verbose %{?_smp_mflags}/' -i Makefile.frag @@ -113,13 +125,16 @@ export PHP_RPATH=no cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS %configure \ --with-awscrt \ --with-libdir=%{_lib} \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} + +%make_build %if %{with_zts} cd ../ZTS @@ -127,25 +142,25 @@ cd ../ZTS --with-awscrt \ --with-libdir=%{_lib} \ --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} + +%make_build %endif %install %{?dtsenable} -make -C NTS \ - install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # 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 -C ZTS \ - install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -171,7 +186,9 @@ done %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE +%license %{sources}/crt/aws-crt-ffi/crt/aws-c-common/THIRD-PARTY-LICENSES.txt + %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -185,6 +202,11 @@ done %changelog +* Mon Oct 21 2024 Remi Collet - 1.2.7-1 +- update to 1.2.7 +- fix out of sources tree using patch from + https://github.com/awslabs/aws-crt-php/pull/117 + * Thu Aug 22 2024 Remi Collet - 1.2.6-2 - missing BR on F41 -- cgit