summaryrefslogtreecommitdiffstats
path: root/php-pecl-decimal.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-decimal.spec')
-rw-r--r--php-pecl-decimal.spec38
1 files changed, 18 insertions, 20 deletions
diff --git a/php-pecl-decimal.spec b/php-pecl-decimal.spec
index 9dd74bd..a5c523f 100644
--- a/php-pecl-decimal.spec
+++ b/php-pecl-decimal.spec
@@ -15,7 +15,6 @@
%global pecl_name decimal
%global pie_vend php-%{pecl_name}
%global pie_proj ext-%{pecl_name}
-# After 20-json.ini
%global ini_name 40-%{pecl_name}.ini
%global _configure ../configure
@@ -30,7 +29,7 @@
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Summary: Arbitrary-precision floating-point decimal
License: MIT
-Version: 1.5.3
+Version: 2.0.1
Release: 1%{?dist}
%forgemeta
URL: %{forgeurl}
@@ -38,13 +37,11 @@ Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.4
-BuildRequires: %{?scl_prefix}php-json
+BuildRequires: %{?scl_prefix}php-devel >= 8.2
BuildRequires: mpdecimal-devel >= 2.4
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Requires: %{?scl_prefix}php-json%{?_isa}
# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
@@ -90,13 +87,14 @@ EOF
%{?dtsenable}
%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
cd NTS
%configure \
--with-decimal \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -104,45 +102,40 @@ cd ../ZTS
--with-decimal \
--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}
%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
%check
-OPT="-n"
-[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
-
-# Minimal load test for NTS extension
-%{__php} $OPT \
+: Minimal load test for NTS extension
+%{__php} -n \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%if %{with tests}
: Upstream test suite for NTS extension
-TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php -q --show-diff
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+%{__php} -n run-tests.php -q --show-diff %{?_smp_mflags}
%endif
%if %{with_zts}
-# Minimal load test for ZTS extension
-%{__ztsphp} $OPT \
+: Minimal load test for ZTS extension
+%{__ztsphp} -n \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%endif
@@ -150,6 +143,7 @@ REPORT_EXIT_STATUS=1 \
%files
%license LICENSE
+%doc composer.json
%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -162,6 +156,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Sun Apr 12 2026 Remi Collet <remi@remirepo.net> - 2.0.1-1
+- update to 2.0.1
+- drop support for PHP < 8.2
+
* Sun Apr 12 2026 Remi Collet <remi@remirepo.net> - 1.5.3-1
- update to 1.5.3