summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-igbinary.spec53
3 files changed, 34 insertions, 23 deletions
diff --git a/PHPINFO b/PHPINFO
index 2b10f9d..2edde63 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
igbinary
igbinary support => enabled
-igbinary version => 3.2.14
+igbinary version => 3.2.15
igbinary APCu serializer ABI => 0
igbinary session support => yes
diff --git a/REFLECTION b/REFLECTION
index a585175..a31b112 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #77 igbinary version 3.2.14 ] {
+Extension [ <persistent> extension #62 igbinary version 3.2.15 ] {
- Dependencies {
Dependency [ standard (Required) ]
diff --git a/php-pecl-igbinary.spec b/php-pecl-igbinary.spec
index d9eab0c..e4207f2 100644
--- a/php-pecl-igbinary.spec
+++ b/php-pecl-igbinary.spec
@@ -26,8 +26,14 @@
#global gh_date 20161018
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 3.2.14
+%global upstream_version 3.2.15
#global upstream_prever RC1
+%if 0%{?gh_date}
+%global sources %{pecl_name}-%{gh_commit}
+%else
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%endif
+%global _configure ../%{sources}/configure
Summary: Replacement for the standard PHP serializer
Name: %{?scl_prefix}php-pecl-igbinary
@@ -36,8 +42,8 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.15.%{gh_date}.%{gh_short}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Source0: https://pecl.php.net/get/%{sources}.tgz
%endif
License: BSD-3-Clause
URL: https://pecl.php.net/package/igbinary
@@ -48,6 +54,8 @@ BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pecl-apcu-devel
BuildRequires: %{?scl_prefix}php-json
+# used by tests
+BuildRequires: tzdata
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -112,7 +120,6 @@ These are the files needed to compile programs using Igbinary
%setup -q -c
%if 0%{?gh_date}
-mv igbinary-%{gh_commit} NTS
%{__php} -r '
$pkg = simplexml_load_file("NTS/package.xml");
$pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2);
@@ -120,13 +127,11 @@ mv igbinary-%{gh_commit} NTS
$pkg->stability->release = "devel";
$pkg->asXML("package.xml");
'
-%else
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
%endif
%{?_licensedir:sed -e '/COPYING/s/role="doc"/role="src"/' -i package.xml}
-cd NTS
+pushd %{sources}
# Check version
subdir=php7
extver=$(sed -n '/#define PHP_IGBINARY_VERSION/{s/.* "//;s/".*$//;p}' src/$subdir/igbinary.h)
@@ -134,10 +139,11 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
: Error: Upstream version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
exit 1
fi
-cd ..
+popd
+mkdir NTS
%if %{with_zts}
-cp -r NTS ZTS
+mkdir ZTS
%endif
cat <<EOF | tee %{ini_name}
@@ -159,15 +165,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
@@ -188,7 +195,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Test & Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
[ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i
@@ -199,12 +206,14 @@ done
%check
+cd %{sources}
+
MOD=""
# drop extension load from phpt
-sed -e '/^extension=/d' -i ?TS/tests/*phpt
+sed -e '/^extension=/d' -i tests/*phpt
: simple NTS module load test, without APCu, as optional
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
@@ -225,10 +234,9 @@ OPTS="-q -P --show-diff"
%endif
: upstream NTS test suite
-cd NTS
TEST_PHP_ARGS="-n $MOD -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php $OPTS
+%{__php} -n run-tests.php $OPTS
%endif
%if %{with_zts}
@@ -239,7 +247,6 @@ REPORT_EXIT_STATUS=1 \
%if %{with tests}
: upstream ZTS test suite
-cd ../ZTS
TEST_PHP_ARGS="-n $MOD -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php $OPTS
@@ -268,7 +275,7 @@ fi
%files
-%{?_licensedir:%license NTS/COPYING}
+%{?_licensedir:%license %{sources}/COPYING}
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -291,6 +298,10 @@ fi
%changelog
+* Mon Dec 4 2023 Remi Collet <remi@remirepo.net> - 3.2.15-1
+- update to 3.2.15
+- build out of sources tree
+
* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.14-2
- rebuild for PHP 8.3.0RC1