diff options
author | Remi Collet <remi@remirepo.net> | 2020-09-28 08:00:07 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-09-28 08:00:07 +0200 |
commit | 7a33d1d18dfec3fb5b5e7d3b2095037d38537e3a (patch) | |
tree | 5ef0be0f8acc7a5fc0cac7b4538f08bed964acb9 | |
parent | e36d75f1954c210bcece05946eef09e5bab396bc (diff) |
update to 0.2.0
enable apcu serializer with PHP 7+
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PHPINFO | 3 | ||||
-rw-r--r-- | REFLECTION | 6 | ||||
-rw-r--r-- | php-snappy.spec | 60 |
4 files changed, 38 insertions, 33 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc @@ -2,5 +2,6 @@ snappy Snappy support => enabled -Extension Version => 0.1.12 +Extension Version => 0.2.0 Snappy Version => 1.1.8 +Snappy APCu serializer ABI => 0 @@ -1,4 +1,8 @@ -Extension [ <persistent> extension #100 snappy version 0.1.12 ] { +Extension [ <persistent> extension #100 snappy version 0.2.0 ] { + + - Dependencies { + Dependency [ apcu (Optional) ] + } - Functions { Function [ <internal:snappy> function snappy_compress ] { diff --git a/php-snappy.spec b/php-snappy.spec index f3a0736..40cec35 100644 --- a/php-snappy.spec +++ b/php-snappy.spec @@ -13,13 +13,16 @@ %global pkg_name %{name} %endif +# To build with PHP 5.x use --without apcu +%bcond_without apcu + %if 0%{?fedora} >= 32 %global with_libsnappy 1 %else %global with_libsnappy 0 %endif -%global gh_commit 128b8076052629c646deb3d854a6ff37f7d9279d +%global gh_commit e42cc15bb38140eae95a295a105ddcbf391dcb7c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner kjdev %global gh_project php-ext-snappy @@ -42,7 +45,7 @@ BuildRequires: devtoolset-7-toolchain Summary: Snappy Extension for PHP Name: %{?sub_prefix}php-snappy -Version: 0.1.12 +Version: 0.2.0 %if 0%{?gh_date:1} Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else @@ -58,7 +61,12 @@ Source0: %{pkg_name}-%{version}-%{gh_short}.tgz # retrieve a recursive git snapshot with submodule Source1: makesrc.sh +%if %{with apcu} +BuildRequires: %{?scl_prefix}php-devel > 7 +BuildRequires: %{?scl_prefix}php-pecl-apcu-devel +%else BuildRequires: %{?scl_prefix}php-devel +%endif %if %{?with_libsnappy} BuildRequires: snappy-devel %else @@ -70,38 +78,14 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} %if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-%{pecl_name} <= %{version} -Obsoletes: php53u-%{pecl_name} <= %{version} -Obsoletes: php54-%{pecl_name} <= %{version} -Obsoletes: php54w-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-%{pecl_name} <= %{version} -Obsoletes: php55w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-%{pecl_name} <= %{version} -Obsoletes: php56w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-%{pecl_name} <= %{version} -Obsoletes: php70w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-%{pecl_name} <= %{version} -Obsoletes: php71w-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-%{pecl_name} <= %{version} -Obsoletes: php72w-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-%{pecl_name} <= %{version} -Obsoletes: php73w-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-%{pecl_name} <= %{version} -Obsoletes: php74w-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-%{pecl_name} <= %{version} %endif %endif @@ -199,7 +183,17 @@ cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' + +%if "%{php_version}" > "7.0" +: Check that apcu is aware of snappy serializer +%{__php} --no-php-ini \ + --define extension=apcu.so \ + --define apc.enabled=1 \ + --define apc.enable_cli=1 \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --ri apcu | grep '%{pecl_name}' +%endif : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ @@ -213,7 +207,7 @@ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ @@ -243,6 +237,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Sep 28 2020 Remi Collet <remi@remirepo.net> - 0.2.0-1 +- update to 0.2.0 +- enable apcu serializer with PHP 7+ + * Thu Sep 10 2020 Remi Collet <remi@remirepo.net> - 0.1.12-1 - update to 0.1.12 |