summaryrefslogtreecommitdiffstats
path: root/php-pecl-awscrt.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-awscrt.spec')
-rw-r--r--php-pecl-awscrt.spec92
1 files changed, 42 insertions, 50 deletions
diff --git a/php-pecl-awscrt.spec b/php-pecl-awscrt.spec
index 4b1dab7..8628bd5 100644
--- a/php-pecl-awscrt.spec
+++ b/php-pecl-awscrt.spec
@@ -11,12 +11,6 @@
%{?scl:%scl_package php-pecl-awscrt}
-# For PHP < 5.6 and EPEL-9
-%{!?__phpize: %global __phpize %{_bindir}/phpize}
-%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
-%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
-%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
-
# not wanted for now
%global with_zts 0
%global pecl_name awscrt
@@ -26,41 +20,44 @@
Summary: AWS Common Runtime PHP bindings
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.2.6
+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
-%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
-BuildRequires: devtoolset-6-toolchain
-%global dtsversion 6
-%global dtsenable source /opt/rh/devtoolset-6/enable
-%global dtsprefix devtoolset-6-
-%endif
+# 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
-%if 0%{?rhel} == 7
-BuildRequires: cmake3
-%else
-BuildRequires: cmake
+%if 0%{?fedora} >= 41
+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}
@@ -85,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
@@ -126,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
@@ -140,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
@@ -169,26 +171,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
# Minimal load test for NTS extension
%{__php} --no-php-ini \
@@ -204,7 +186,9 @@ fi
%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
@@ -218,6 +202,14 @@ fi
%changelog
+* Mon Oct 21 2024 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 1.2.6-2
+- missing BR on F41
+
* Fri Jun 14 2024 Remi Collet <remi@remirepo.net> - 1.2.6-1
- update to 1.2.6