summaryrefslogtreecommitdiffstats
path: root/php-pecl-yac.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-yac.spec')
-rw-r--r--php-pecl-yac.spec30
1 files changed, 19 insertions, 11 deletions
diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec
index 367de44..c42c72b 100644
--- a/php-pecl-yac.spec
+++ b/php-pecl-yac.spec
@@ -29,16 +29,17 @@
Summary: Lockless user data cache
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 2.2.1
+License: PHP
+URL: https://pecl.php.net/package/%{pecl_name}
%if 0%{?gh_date:1}
Release: 0.12.%{gh_date}git%{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;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
-License: PHP
-URL: https://pecl.php.net/package/%{pecl_name}
+Patch0: https://patch-diff.githubusercontent.com/raw/laruence/yac/pull/115.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
@@ -68,19 +69,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -119,6 +117,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr115
+
%if %{with_fastlz}
sed -e '\:name="compressor/fastlz:d' -i ../package.xml
rm -r compressor/fastlz
@@ -204,7 +204,11 @@ done
%check
cd NTS
-OPTS="-n -d extension=json.so -d extension=igbinary.so -d extension=msgpack.so"
+OPTS="-n"
+[ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so"
+[ -f %{php_extdir}/igbinary.so ] && OPTS="$OPTS -d extension=igbinary.so"
+[ -f %{php_extdir}/msgpack.so ] && OPTS="$OPTS -d extension=msgpack.so"
+
: Minimal load test for NTS extension
%{_bindir}/php $OPTS \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -277,6 +281,10 @@ fi
%changelog
+* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.2.1-2
+- add patch for PHP 8 from
+ https://github.com/laruence/yac/pull/115
+
* Fri May 15 2020 Remi Collet <remi@remirepo.net> - 2.2.1-1
- update to 2.2.1