summaryrefslogtreecommitdiffstats
path: root/php-pecl-decimal.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-12 08:03:18 +0200
committerRemi Collet <remi@php.net>2026-04-12 08:03:18 +0200
commit406e31f27315f30ce58bab71d57b391f88c75c50 (patch)
tree4e00cdb3e5bdbae239b55e68e4cfede446ded766 /php-pecl-decimal.spec
parenta6a14575a84d3571aa4f7ebb5fbbcda6143c69a8 (diff)
update to 1.5.1
drop pear/pecl dependency sources from github open https://github.com/php-decimal/ext-decimal/issues/91 is not compatible with PHP 7.x
Diffstat (limited to 'php-pecl-decimal.spec')
-rw-r--r--php-pecl-decimal.spec76
1 files changed, 35 insertions, 41 deletions
diff --git a/php-pecl-decimal.spec b/php-pecl-decimal.spec
index 27d09da..02c7759 100644
--- a/php-pecl-decimal.spec
+++ b/php-pecl-decimal.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-decimal
#
-# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2018-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -9,31 +9,37 @@
%{?scl:%scl_package php-pecl-decimal}
-%bcond_without tests
+%bcond_without tests
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name decimal
-%global pie_vend php-decimal
-%global pie_proj ext-decimal
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%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 sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
+%global ini_name 40-%{pecl_name}.ini
+%global _configure ../configure
+
+# Github forge
+%global gh_vend %{pie_vend}
+%global gh_proj %{pie_proj}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
-Summary: Arbitrary-precision floating-point decimal
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.5.0
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: Arbitrary-precision floating-point decimal
License: MIT
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{sources}.tgz
-
-Patch0: 0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch
+Version: 1.5.1
+Release: 1%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
+# See https://github.com/php-decimal/ext-decimal/issues/91
+BuildRequires: %{?scl_prefix}php-devel >= 8.0
BuildRequires: %{?scl_prefix}php-json
BuildRequires: mpdecimal-devel >= 2.4
@@ -60,14 +66,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -c
-
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
-cd %{sources}
-%patch -P0 -p1
+%forgesetup
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DECIMAL_VERSION/{s/.* "//;s/".*$//;p}' php_decimal.h)
@@ -75,7 +74,6 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
exit 1
fi
-cd ..
mkdir NTS
%if %{with_zts}
@@ -92,10 +90,9 @@ EOF
%build
%{?dtsenable}
-cd %{sources}
%{__phpize}
-cd ../NTS
+cd NTS
%configure \
--with-decimal \
--with-libdir=%{_lib} \
@@ -120,23 +117,14 @@ make -C NTS install INSTALL_ROOT=%{buildroot}
# 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}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
-cd %{sources}
OPT="-n"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -162,9 +150,8 @@ REPORT_EXIT_STATUS=1 \
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -176,6 +163,13 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Sat Apr 11 2026 Remi Collet <remi@remirepo.net> - 1.5.1-1
+- update to 1.5.1
+- drop pear/pecl dependency
+- sources from github
+- open https://github.com/php-decimal/ext-decimal/issues/91
+ is not compatible with PHP 7.x
+
* Mon Sep 29 2025 Remi Collet <remi@remirepo.net> - 1.5.0-3
- fix test suite for PHP 8.5.0RC1 using patch from
https://github.com/php-decimal/ext-decimal/pull/89