summaryrefslogtreecommitdiffstats
path: root/php-pecl-sync.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-17 15:52:52 +0200
committerRemi Collet <remi@php.net>2025-07-17 15:52:52 +0200
commit5dd905549f996a8eeb185a56699406f42dd7ba45 (patch)
tree809e9fc89829b1f8898bd7ee98f08d92526a4871 /php-pecl-sync.spec
parent5420a4e02b87a62d07886a22b1558d47fcc9219c (diff)
add fix for PHP 8.5.0alpha2 using patch fromHEADmaster
https://github.com/php/pecl-system-sync/pull/10 re-license spec file to CECILL-2.1
Diffstat (limited to 'php-pecl-sync.spec')
-rw-r--r--php-pecl-sync.spec93
1 files changed, 44 insertions, 49 deletions
diff --git a/php-pecl-sync.spec b/php-pecl-sync.spec
index 1385123..55ccafe 100644
--- a/php-pecl-sync.spec
+++ b/php-pecl-sync.spec
@@ -1,29 +1,31 @@
# remirepo spec file for php-pecl-sync
#
-# Copyright (c) 2014-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2014-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
%{?scl:%scl_package php-pecl-sync}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name sync
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
-%global ini_name 40-%{pecl_name}.ini
-%endif
+%bcond_without tests
+
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name sync
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Named and unnamed synchronization objects
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.3
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: MIT
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+
+Patch0: 10.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -32,7 +34,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}
@@ -51,14 +52,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
-cd NTS
+cd %{sources}
+%patch -P0 -p1
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_SYNC_VERSION/{s/.* "//;s/".*$//;p}' php_sync.h)
if test "x${extver}" != "x%{version}"; then
@@ -67,9 +69,9 @@ if test "x${extver}" != "x%{version}"; 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
@@ -82,17 +84,18 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -116,59 +119,43 @@ 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 install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for NTS extension
export TEST_PHP_EXECUTABLE=%{__php}
export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so"
export REPORT_EXIT_STATUS=1
%{__php} -n run-tests.php -q --show-diff
+%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for ZTS extension
-export TEST_PHP_EXECUTABLE=%{_bindir}/zts-php
+export TEST_PHP_EXECUTABLE=%{__ztsphp}
export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so"
-%{_bindir}/zts-php -n run-tests.php -q --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
+%endif
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -182,6 +169,14 @@ export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.
%changelog
+* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 1.1.3-3
+- add fix for PHP 8.5.0alpha2 using patch from
+ https://github.com/php/pecl-system-sync/pull/10
+- re-license spec file to CECILL-2.1
+
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.1.3-2
+- build out of sources tree
+
* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.1.3-1
- update to 1.1.3