summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-xdebug3.spec54
1 files changed, 30 insertions, 24 deletions
diff --git a/php-pecl-xdebug3.spec b/php-pecl-xdebug3.spec
index c5291ce..c9184d3 100644
--- a/php-pecl-xdebug3.spec
+++ b/php-pecl-xdebug3.spec
@@ -21,14 +21,16 @@
%global pecl_name xdebug
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global gh_commit 2c5f0ffddc63e8491018979e21adc704399ee0b3
+%global gh_commit a909eb088ad9fd8c8e09fcc71d892fa54b957b31
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20201011
# version/release
-%global upstream_version 3.2.1
+%global upstream_version 3.2.2
#global upstream_prever RC2
-#lobal upstream_lower %%(echo %%{upstream_prever} | tr '[:upper:]' '[:lower:]')
+#global upstream_lower %%(echo %%{upstream_prever} | tr '[:upper:]' '[:lower:]')
+%global sources src
+%global _configure ../%{sources}/configure
# XDebug should be loaded after opcache
%global ini_name 15-%{pecl_name}.ini
@@ -42,10 +44,7 @@ Release: 1.%{gh_date}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo "."
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
-# The Xdebug License, SPDX see
-# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/95
-# https://github.com/spdx/license-list-XML/issues/1718
-License: PHP-3.01
+License: Xdebug-1.03
URL: https://xdebug.org/
Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
@@ -60,7 +59,6 @@ BuildRequires: %{?scl_prefix}php-soap
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -118,7 +116,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{pecl_name}-%{gh_commit} NTS
+mv %{pecl_name}-%{gh_commit} src
%if 0%{?gh_date:1}
%{__php} -r '
@@ -129,12 +127,12 @@ mv %{pecl_name}-%{gh_commit} NTS
$pkg->asXML("package.xml");
'
%else
-mv NTS/package.xml .
+mv %{sources}/package.xml .
%endif
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-cd NTS
+cd %{sources}
# Check extension version
ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h)
if test "$ver" != "%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then
@@ -144,9 +142,9 @@ fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
cat << 'EOF' | tee %{ini_name}
@@ -157,25 +155,26 @@ zend_extension=%{pecl_name}.so
; See https://xdebug.org/docs/all_settings
EOF
-sed -e '1d' NTS/%{pecl_name}.ini >>%{ini_name}
+sed -e '1d' %{sources}/%{pecl_name}.ini >>%{ini_name}
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--enable-xdebug \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--enable-xdebug \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -200,10 +199,11 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
+cd %{sources}
+for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do
- [ -f NTS/contrib/$i ] && j=contrib/$i || j=$i
- install -Dpm 644 NTS/$j %{buildroot}%{pecl_docdir}/%{pecl_name}/$j
+ [ -f contrib/$i ] && j=contrib/$i || j=$i
+ install -Dpm 644 $j %{buildroot}%{pecl_docdir}/%{pecl_name}/$j
done
@@ -230,7 +230,7 @@ done
%endif
%if %{with tests}
-cd NTS
+cd %{sources}
: Upstream test suite NTS extension
# bug00886 is marked as slow as it uses a lot of disk space
@@ -266,7 +266,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -280,6 +280,12 @@ fi
%changelog
+* Sun Jul 16 2023 Remi Collet <remi@remirepo.net> - 3.2.2-1
+- update to 3.2.2
+- build out of sources tree
+- use new SPDX license ID Xdebug-1.03
+- open https://github.com/xdebug/xdebug/pull/896 relax test expectation
+
* Tue Mar 21 2023 Remi Collet <remi@remirepo.net> - 3.2.1-1
- update to 3.2.1