summaryrefslogtreecommitdiffstats
path: root/php-pecl-xmldiff.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-xmldiff.spec')
-rw-r--r--php-pecl-xmldiff.spec85
1 files changed, 32 insertions, 53 deletions
diff --git a/php-pecl-xmldiff.spec b/php-pecl-xmldiff.spec
index 3531a51..5b3fe74 100644
--- a/php-pecl-xmldiff.spec
+++ b/php-pecl-xmldiff.spec
@@ -6,26 +6,25 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-xmldiff
-%endif
+%{?scl:%scl_package php-pecl-xmldiff}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name xmldiff
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name xmldiff
%if "%{php_version}" < "5.6"
# After dom
-%global ini_name %{pecl_name}.ini
+%global ini_name %{pecl_name}.ini
%else
# After 20-dom
-%global ini_name 40-%{pecl_name}.ini
+%global ini_name 40-%{pecl_name}.ini
%endif
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: XML diff and merge
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.3
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: BSD
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: BSD-2-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
@@ -42,31 +41,11 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-dom%{?_isa}
Requires: %{?scl_prefix}php-libxml%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
%description
@@ -96,9 +75,7 @@ sed -e '/name="diffmark/d' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-mv %{pecl_name}-%{version} NTS
-
-cd NTS
+cd %{sources}
# drop bundled library to ensure it is not used
rm -rf diffmark
@@ -110,9 +87,10 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -125,21 +103,22 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-libdiffmark \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-libdiffmark \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -163,10 +142,10 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Test & Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
done
@@ -191,39 +170,36 @@ fi
%check
-cd NTS
+cd %{sources}
# Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=dom.so \
- --define extension=modules/%{pecl_name}.so \
+ --define extension=../NTS/modules/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
# Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{_bindir}/php \
-TEST_PHP_ARGS="-n -d extension=dom.so -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="-n -d extension=dom.so -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php
+%{__php} -n run-tests.php -q --show-diff
%if %{with_zts}
-cd ../ZTS
# Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=dom.so \
- --define extension=modules/%{pecl_name}.so \
+ --define extension=../ZTS/modules/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
# Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=dom.so -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="-n -d extension=dom.so -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__ztsphp} -n run-tests.php -q --show-diff
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -245,6 +221,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jul 19 2023 Remi Collet <remi@remirepo.net> - 1.1.3-3
+- build out of sources tree
+
* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.1.3-2
- rebuild for 8.1.0RC1