summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-msgpack.spec80
3 files changed, 43 insertions, 41 deletions
diff --git a/PHPINFO b/PHPINFO
index c69034f..49b3fe8 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,7 +3,7 @@ msgpack
MessagePack Support => enabled
Session Support => enabled
-extension Version => 2.2.0RC2
+extension Version => 2.2.0
header Version => 3.2.0
Directive => Local Value => Master Value
diff --git a/REFLECTION b/REFLECTION
index 4451332..6298c67 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #86 msgpack version 2.2.0RC2 ] {
+Extension [ <persistent> extension #85 msgpack version 2.2.0 ] {
- INI {
Entry [ msgpack.error_display <ALL> ]
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec
index 3fa4910..9a37a11 100644
--- a/php-pecl-msgpack.spec
+++ b/php-pecl-msgpack.spec
@@ -3,28 +3,33 @@
#
# Fedora spec file for php-pecl-msgpack
#
-# Copyright (c) 2012-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2012-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%scl_package php-pecl-msgpack
-%endif
+%{?scl:%scl_package php-pecl-msgpack}
+
+# Defined in Fedora >= 37 and RHEL >= 10, in PHP >= 7.4 for remirepo
+%{!?__phpize: %global __phpize %{_bindir}/phpize}
+%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
+%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
+%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
%global gh_commit 943d27267fbf6da6b4d225f344f4731aec0c671b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner msgpack
%global gh_project msgpack-php
-#global gh_date 20171026
%global pecl_name msgpack
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
%global upstream_version 2.2.0
-%global upstream_prever RC2
-%global upstream_lower RC2
+#global upstream_prever RC2
+#global upstream_lower RC2
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
# to use system library
%bcond_with msgpack
@@ -34,16 +39,11 @@
Summary: API for communicating with MessagePack serialization
Name: %{?scl_prefix}php-pecl-msgpack
-License: BSD
+License: BSD-3-Clause
Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}}
URL: https://pecl.php.net/package/msgpack
-%if 0%{?gh_date:1}
-Release: 0.7.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-%else
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-%endif
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -72,9 +72,6 @@ Obsoletes: php73-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
%endif
@@ -109,17 +106,10 @@ These are the files needed to compile programs using MessagePack serializer.
%prep
%setup -qc
-%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-sed -e '/release/s/0.5.6/%{version}%{?gh_date:dev}/' -i package.xml
-%else
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
-%endif
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-cd NTS
+cd %{sources}
%if %{with msgpack}
# use system library
rm -rf msgpack
@@ -133,9 +123,10 @@ 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
# Drop in the bit of configuration
@@ -154,15 +145,16 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
-%configure --with-php-config=%{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+%configure --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-%configure --with-php-config=%{_bindir}/zts-php-config
+%configure --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -184,7 +176,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Test & Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i
[ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
@@ -202,7 +194,13 @@ rm */tests/034.phpt
rm */tests/035.phpt
%endif
-cd NTS
+%if "%{php_version}" > "7.4"
+OPT="-q --show-diff %{?_smp_mflags}"
+%else
+OPT="-q --show-diff"
+%endif
+
+cd %{sources}
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -211,13 +209,12 @@ cd NTS
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php -q --show-diff
+%{__php} -n run-tests.php $OPT
%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -226,9 +223,9 @@ cd ../ZTS
%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
+%{__ztsphp} -n run-tests.php $OPT
%endif
%endif
@@ -254,7 +251,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -277,6 +274,11 @@ fi
%changelog
+* Fri Jun 2 2023 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+- build out of sources tree
+- use parallel execution for test suite
+
* Fri Oct 7 2022 Remi Collet <remi@remirepo.net> - 2.2.0~RC2-1
- update to 2.2.0RC2