summaryrefslogtreecommitdiffstats
path: root/php-pecl-teds.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-04 10:06:56 +0200
committerRemi Collet <remi@php.net>2023-09-04 10:06:56 +0200
commit2c3c897ecfe1c4a6657446bbc48bffcbcb580aff (patch)
tree7449ba201701543b2d5aa5988b170f08ab8cf132 /php-pecl-teds.spec
parentd073a413b8cadd5438e62073f202fb81c8fafeaf (diff)
build out of sources treeHEADmaster
add patch for test suite with PHP 8.3 from https://github.com/TysonAndre/pecl-teds/pull/204
Diffstat (limited to 'php-pecl-teds.spec')
-rw-r--r--php-pecl-teds.spec56
1 files changed, 30 insertions, 26 deletions
diff --git a/php-pecl-teds.spec b/php-pecl-teds.spec
index 20d7dfc..362be77 100644
--- a/php-pecl-teds.spec
+++ b/php-pecl-teds.spec
@@ -1,35 +1,35 @@
# remirepo spec file for php-pecl-teds
#
-# Copyright (c) 2021-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2021-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%scl_package php-pecl-teds
-%endif
+%{?scl:%scl_package php-pecl-teds}
%bcond_without tests
+
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name teds
%global ini_name 40-%{pecl_name}.ini
%global upstream_version 1.3.0
#global upstream_prever a1
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: Tentative Extra Data Structures
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: BSD
+License: BSD-3-Clause
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+
+Patch0: %{pecl_name}-php83.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -38,7 +38,6 @@ BuildRequires: %{?scl_prefix}php-pear
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}
@@ -55,14 +54,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
+%patch -P0 -p1 -b.pr204
# Check version as upstream often forget to update this
extver=$(sed -n '/define PHP_TEDS_VERSION/{s/.* "//;s/".*$//;p}' php_teds.h)
@@ -72,10 +71,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}
fi
cd ..
-
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -94,15 +92,16 @@ peclconf() {
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -125,13 +124,13 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
@@ -144,7 +143,7 @@ done
%endif
%if %{with tests}
-cd NTS
+cd %{sources}
: Run upstream test suite
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%{__php} -n run-tests.php -q --show-diff %{?_smp_mflags}
@@ -172,7 +171,7 @@ fi
%files
-%{?_licensedir:%license NTS/COPYING}
+%{?_licensedir:%license %{sources}/COPYING}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -186,6 +185,11 @@ fi
%changelog
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.3.0-2
+- build out of sources tree
+- add patch for test suite with PHP 8.3 from
+ https://github.com/TysonAndre/pecl-teds/pull/204
+
* Thu Nov 10 2022 Remi Collet <remi@remirepo.net> - 1.3.0-1
- update to 1.3.0