summaryrefslogtreecommitdiffstats
path: root/php-pecl-ion.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-01 09:29:29 +0200
committerRemi Collet <remi@php.net>2024-10-01 09:29:29 +0200
commite1b5e5b7d25eae58284f70b4339d98ebe9afc4eb (patch)
tree41dae5b792c304e09273ee2f0561e72da41f03c1 /php-pecl-ion.spec
parent319e03bd9e21389844999dbadac2a066446dfa56 (diff)
fix test suite with 8.4 using patch from
https://github.com/awesomized/ext-ion/pull/10
Diffstat (limited to 'php-pecl-ion.spec')
-rw-r--r--php-pecl-ion.spec54
1 files changed, 14 insertions, 40 deletions
diff --git a/php-pecl-ion.spec b/php-pecl-ion.spec
index 7c3b64a..1a469aa 100644
--- a/php-pecl-ion.spec
+++ b/php-pecl-ion.spec
@@ -37,7 +37,7 @@
Summary: Amazon ION support
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD-2-Clause
URL: https://pecl.php.net/package/%{pecl_name}
@@ -45,13 +45,10 @@ Source0: https://pecl.php.net/get/%{sources}.tgz
Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_version}-%{gh_short}.tar.gz
Patch0: %{pecl_name}-php82.patch
+Patch1: %{pecl_name}-php84.patch
BuildRequires: make
-%if 0%{?rhel} == 7
-BuildRequires: cmake3 >= 3.6
-%else
BuildRequires: cmake >= 3.6
-%endif
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.1
BuildRequires: %{?scl_prefix}php-pear
@@ -66,11 +63,6 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
# Bundled library
Provides: bundled(ion-c) = %{gh_version}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-
%description
This PHP extension provides support for the Amazon ION serialization format.
@@ -85,11 +77,12 @@ 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"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
%patch -P0 -p1 -b .php82
+%patch -P1 -p1 -b .php84
# use bundled library
ln -s ../%{gh_project}-%{gh_commit} ion-c
@@ -123,10 +116,6 @@ EOF
%build
%{?dtsenable}
-%if 0%{?rhel} == 7
-export CMAKE=%{_root_bindir}/cmake3
-%endif
-
# See https://github.com/awesomized/ext-ion/issues/9
export CFLAGS="%{optflags} -Wno-incompatible-pointer-types"
@@ -138,15 +127,16 @@ peclconf() {
cd %{sources}
%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
cd ../NTS
peclconf %{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
peclconf %{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
@@ -154,7 +144,7 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
# Install XML package description
@@ -162,7 +152,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Install the ZTS stuff
%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
@@ -194,28 +184,8 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%endif
-%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
-
-
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -229,6 +199,10 @@ fi
%changelog
+* Tue Oct 1 2024 Remi Collet <remi@remirepo.net> - 0.2.1-5
+- fix test suite with 8.4 using patch from
+ https://github.com/awesomized/ext-ion/pull/10
+
* Fri Feb 16 2024 Remi Collet <remi@remirepo.net> - 0.2.1-4
- F40: ignore [-Wincompatible-pointer-types]
reported as https://github.com/awesomized/ext-ion/issues/9