From 68ad6a9637deaa93f00090fb7bc9f7a5acbd8b97 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 24 Jun 2017 10:44:01 +0200 Subject: switch --- .gitignore | 7 + REFLECTION | 350 ++++++++++++++++++++++++++++++++++++- REFLECTION-PHP7 | 445 ------------------------------------------------ php-tarantool-php7.spec | 197 --------------------- php-tarantool.spec | 81 ++++----- 5 files changed, 393 insertions(+), 687 deletions(-) create mode 100644 .gitignore delete mode 100644 REFLECTION-PHP7 delete mode 100644 php-tarantool-php7.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/REFLECTION b/REFLECTION index a4fd1a9..cb3583d 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,10 +1,13 @@ -Extension [ extension #16 tarantool version 1.0 ] { +Extension [ extension #127 tarantool version 0.2.0 ] { - INI { - Entry [ tarantool.con_per_host ] - Current = '5' + Entry [ tarantool.persistent ] + Current = '0' + } + Entry [ tarantool.use_namespace ] + Current = '0' } - Entry [ tarantool.persistent ] + Entry [ tarantool.connection_alias ] Current = '0' } Entry [ tarantool.timeout ] @@ -36,10 +39,25 @@ Extension [ extension #16 tarantool version 1.0 ] { Constant [ integer TARANTOOL_ITER_NEIGHBOR ] { 11 } } - - Classes [1] { + - Classes [5] { Class [ class Tarantool ] { - - Constants [0] { + - Constants [15] { + Constant [ integer ITERATOR_EQ ] { 0 } + Constant [ integer ITERATOR_REQ ] { 1 } + Constant [ integer ITERATOR_ALL ] { 2 } + Constant [ integer ITERATOR_LT ] { 3 } + Constant [ integer ITERATOR_LE ] { 4 } + Constant [ integer ITERATOR_GE ] { 5 } + Constant [ integer ITERATOR_GT ] { 6 } + Constant [ integer ITERATOR_BITS_ALL_SET ] { 7 } + Constant [ integer ITERATOR_BITSET_ALL_SET ] { 7 } + Constant [ integer ITERATOR_BITS_ANY_SET ] { 8 } + Constant [ integer ITERATOR_BITSET_ANY_SET ] { 8 } + Constant [ integer ITERATOR_BITS_ALL_NOT_SET ] { 9 } + Constant [ integer ITERATOR_BITSET_ALL_NOT_SET ] { 9 } + Constant [ integer ITERATOR_OVERLAPS ] { 10 } + Constant [ integer ITERATOR_NEIGHBOR ] { 11 } } - Static properties [0] { @@ -51,56 +69,374 @@ Extension [ extension #16 tarantool version 1.0 ] { - Properties [0] { } - - Methods [17] { + - Methods [18] { Method [ public method __construct ] { + + - Parameters [5] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $login ] + Parameter #3 [ $password ] + Parameter #4 [ $persistent_id ] + } } Method [ public method connect ] { + + - Parameters [0] { + } + } + + Method [ public method reconnect ] { + + - Parameters [0] { + } } Method [ public method close ] { + + - Parameters [0] { + } } Method [ public method flush_schema ] { + + - Parameters [0] { + } } Method [ public method authenticate ] { + + - Parameters [2] { + Parameter #0 [ $login ] + Parameter #1 [ $password ] + } } Method [ public method ping ] { + + - Parameters [0] { + } } Method [ public method select ] { + + - Parameters [6] { + Parameter #0 [ $space ] + Parameter #1 [ $key ] + Parameter #2 [ $index ] + Parameter #3 [ $limit ] + Parameter #4 [ $offset ] + Parameter #5 [ $iterator ] + } } Method [ public method insert ] { + + - Parameters [2] { + Parameter #0 [ $space ] + Parameter #1 [ array $tuple ] + } } Method [ public method replace ] { + + - Parameters [2] { + Parameter #0 [ $space ] + Parameter #1 [ array $tuple ] + } } Method [ public method call ] { + + - Parameters [2] { + Parameter #0 [ $proc ] + Parameter #1 [ $tuple ] + } } Method [ public method eval ] { + + - Parameters [2] { + Parameter #0 [ $proc ] + Parameter #1 [ $tuple ] + } } Method [ public method delete ] { + + - Parameters [3] { + Parameter #0 [ $space ] + Parameter #1 [ $key ] + Parameter #2 [ $index ] + } } Method [ public method update ] { + + - Parameters [4] { + Parameter #0 [ $space ] + Parameter #1 [ $key ] + Parameter #2 [ array $args ] + Parameter #3 [ $index ] + } } Method [ public method upsert ] { + + - Parameters [3] { + Parameter #0 [ $space ] + Parameter #1 [ array $tuple ] + Parameter #2 [ array $args ] + } } Method [ public method evaluate ] { + + - Parameters [2] { + Parameter #0 [ $proc ] + Parameter #1 [ $tuple ] + } } Method [ public method flushSchema ] { + + - Parameters [0] { + } } Method [ public method disconnect ] { + + - Parameters [0] { + } + } + } + } + + Class [ class TarantoolException extends Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class TarantoolIOException extends TarantoolException implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class TarantoolClientError extends TarantoolException implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class TarantoolParsingException extends TarantoolException implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { } } } diff --git a/REFLECTION-PHP7 b/REFLECTION-PHP7 deleted file mode 100644 index cb3583d..0000000 --- a/REFLECTION-PHP7 +++ /dev/null @@ -1,445 +0,0 @@ -Extension [ extension #127 tarantool version 0.2.0 ] { - - - INI { - Entry [ tarantool.persistent ] - Current = '0' - } - Entry [ tarantool.use_namespace ] - Current = '0' - } - Entry [ tarantool.connection_alias ] - Current = '0' - } - Entry [ tarantool.timeout ] - Current = '10.0' - } - Entry [ tarantool.request_timeout ] - Current = '10.0' - } - Entry [ tarantool.retry_count ] - Current = '1' - } - Entry [ tarantool.retry_sleep ] - Current = '0.1' - } - } - - - Constants [12] { - Constant [ integer TARANTOOL_ITER_EQ ] { 0 } - Constant [ integer TARANTOOL_ITER_REQ ] { 1 } - Constant [ integer TARANTOOL_ITER_ALL ] { 2 } - Constant [ integer TARANTOOL_ITER_LT ] { 3 } - Constant [ integer TARANTOOL_ITER_LE ] { 4 } - Constant [ integer TARANTOOL_ITER_GE ] { 5 } - Constant [ integer TARANTOOL_ITER_GT ] { 6 } - Constant [ integer TARANTOOL_ITER_BITSET_ALL_SET ] { 7 } - Constant [ integer TARANTOOL_ITER_BITSET_ANY_SET ] { 8 } - Constant [ integer TARANTOOL_ITER_BITSET_ALL_NOT_SET ] { 9 } - Constant [ integer TARANTOOL_ITER_OVERLAPS ] { 10 } - Constant [ integer TARANTOOL_ITER_NEIGHBOR ] { 11 } - } - - - Classes [5] { - Class [ class Tarantool ] { - - - Constants [15] { - Constant [ integer ITERATOR_EQ ] { 0 } - Constant [ integer ITERATOR_REQ ] { 1 } - Constant [ integer ITERATOR_ALL ] { 2 } - Constant [ integer ITERATOR_LT ] { 3 } - Constant [ integer ITERATOR_LE ] { 4 } - Constant [ integer ITERATOR_GE ] { 5 } - Constant [ integer ITERATOR_GT ] { 6 } - Constant [ integer ITERATOR_BITS_ALL_SET ] { 7 } - Constant [ integer ITERATOR_BITSET_ALL_SET ] { 7 } - Constant [ integer ITERATOR_BITS_ANY_SET ] { 8 } - Constant [ integer ITERATOR_BITSET_ANY_SET ] { 8 } - Constant [ integer ITERATOR_BITS_ALL_NOT_SET ] { 9 } - Constant [ integer ITERATOR_BITSET_ALL_NOT_SET ] { 9 } - Constant [ integer ITERATOR_OVERLAPS ] { 10 } - Constant [ integer ITERATOR_NEIGHBOR ] { 11 } - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [0] { - } - - - Methods [18] { - Method [ public method __construct ] { - - - Parameters [5] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $login ] - Parameter #3 [ $password ] - Parameter #4 [ $persistent_id ] - } - } - - Method [ public method connect ] { - - - Parameters [0] { - } - } - - Method [ public method reconnect ] { - - - Parameters [0] { - } - } - - Method [ public method close ] { - - - Parameters [0] { - } - } - - Method [ public method flush_schema ] { - - - Parameters [0] { - } - } - - Method [ public method authenticate ] { - - - Parameters [2] { - Parameter #0 [ $login ] - Parameter #1 [ $password ] - } - } - - Method [ public method ping ] { - - - Parameters [0] { - } - } - - Method [ public method select ] { - - - Parameters [6] { - Parameter #0 [ $space ] - Parameter #1 [ $key ] - Parameter #2 [ $index ] - Parameter #3 [ $limit ] - Parameter #4 [ $offset ] - Parameter #5 [ $iterator ] - } - } - - Method [ public method insert ] { - - - Parameters [2] { - Parameter #0 [ $space ] - Parameter #1 [ array $tuple ] - } - } - - Method [ public method replace ] { - - - Parameters [2] { - Parameter #0 [ $space ] - Parameter #1 [ array $tuple ] - } - } - - Method [ public method call ] { - - - Parameters [2] { - Parameter #0 [ $proc ] - Parameter #1 [ $tuple ] - } - } - - Method [ public method eval ] { - - - Parameters [2] { - Parameter #0 [ $proc ] - Parameter #1 [ $tuple ] - } - } - - Method [ public method delete ] { - - - Parameters [3] { - Parameter #0 [ $space ] - Parameter #1 [ $key ] - Parameter #2 [ $index ] - } - } - - Method [ public method update ] { - - - Parameters [4] { - Parameter #0 [ $space ] - Parameter #1 [ $key ] - Parameter #2 [ array $args ] - Parameter #3 [ $index ] - } - } - - Method [ public method upsert ] { - - - Parameters [3] { - Parameter #0 [ $space ] - Parameter #1 [ array $tuple ] - Parameter #2 [ array $args ] - } - } - - Method [ public method evaluate ] { - - - Parameters [2] { - Parameter #0 [ $proc ] - Parameter #1 [ $tuple ] - } - } - - Method [ public method flushSchema ] { - - - Parameters [0] { - } - } - - Method [ public method disconnect ] { - - - Parameters [0] { - } - } - } - } - - Class [ class TarantoolException extends Exception implements Throwable ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - } - - - Methods [10] { - Method [ public method __construct ] { - - - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] - } - } - - Method [ public method __wakeup ] { - } - - Method [ final public method getMessage ] { - } - - Method [ final public method getCode ] { - } - - Method [ final public method getFile ] { - } - - Method [ final public method getLine ] { - } - - Method [ final public method getTrace ] { - } - - Method [ final public method getPrevious ] { - } - - Method [ final public method getTraceAsString ] { - } - - Method [ public method __toString ] { - } - } - } - - Class [ class TarantoolIOException extends TarantoolException implements Throwable ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - } - - - Methods [10] { - Method [ public method __construct ] { - - - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] - } - } - - Method [ public method __wakeup ] { - } - - Method [ final public method getMessage ] { - } - - Method [ final public method getCode ] { - } - - Method [ final public method getFile ] { - } - - Method [ final public method getLine ] { - } - - Method [ final public method getTrace ] { - } - - Method [ final public method getPrevious ] { - } - - Method [ final public method getTraceAsString ] { - } - - Method [ public method __toString ] { - } - } - } - - Class [ class TarantoolClientError extends TarantoolException implements Throwable ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - } - - - Methods [10] { - Method [ public method __construct ] { - - - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] - } - } - - Method [ public method __wakeup ] { - } - - Method [ final public method getMessage ] { - } - - Method [ final public method getCode ] { - } - - Method [ final public method getFile ] { - } - - Method [ final public method getLine ] { - } - - Method [ final public method getTrace ] { - } - - Method [ final public method getPrevious ] { - } - - Method [ final public method getTraceAsString ] { - } - - Method [ public method __toString ] { - } - } - } - - Class [ class TarantoolParsingException extends TarantoolException implements Throwable ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - } - - - Methods [10] { - Method [ public method __construct ] { - - - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] - } - } - - Method [ public method __wakeup ] { - } - - Method [ final public method getMessage ] { - } - - Method [ final public method getCode ] { - } - - Method [ final public method getFile ] { - } - - Method [ final public method getLine ] { - } - - Method [ final public method getTrace ] { - } - - Method [ final public method getPrevious ] { - } - - Method [ final public method getTraceAsString ] { - } - - Method [ public method __toString ] { - } - } - } - } -} - diff --git a/php-tarantool-php7.spec b/php-tarantool-php7.spec deleted file mode 100644 index c6225c3..0000000 --- a/php-tarantool-php7.spec +++ /dev/null @@ -1,197 +0,0 @@ -# remirepo spec file for php-tarantool -# -# Copyright (c) 2016-2017 Remi Collet -# -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ -# -# Please preserve changelog entries -# - -%if 0%{?scl:1} -# PHPUnit not available in SCL -%global sub_prefix %{scl_prefix} -%scl_package php-tarantool - -%else -%global pkg_name %{name} -%endif - -%global github_owner tarantool -%global github_name tarantool-php -%global github_commit 3bf856687bc2e72a093f4c01c1f80d2bc39de928 -%global github_short %(c=%{github_commit}; echo ${c:0:7}) -#global github_date 20160906 - -%global ext_name tarantool -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global ini_name 40-%{ext_name}.ini - -# Test suite requires a running server -%global with_tests 0 - -Name: %{?sub_prefix}php-%{ext_name} -Version: 0.2.0 -%if 0%{?github_date} -Release: 0.1.%{?github_date}git%{?github_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -%else -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -%endif -Summary: PHP driver for Tarantool/Box - -Group: Development/Libraries -# see https://github.com/tarantool/tarantool-php/issues/77 -License: BSD -URL: https://github.com/%{github_owner}/%{github_name} -Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{pkg_name}-%{version}-%{github_short}.tar.gz - -BuildRequires: %{?scl_prefix}php-devel >= 7 -%if %{with_tests} -# For tests -BuildRequires: %{_bindir}/phpunit -%endif - -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-%{ext_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version}-%{release} -%endif -## PECL compatibility -Provides: %{?scl_prefix}php-pecl(tarantool.github.io/tarantool-php/pecl/Tarantool) = %{version} -Provides: %{?scl_prefix}php-pecl(tarantool.github.io/tarantool-php/pecl/Tarantool)%{?_isa} = %{version} - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-%{ext_name} <= %{version} -Obsoletes: php53u-%{ext_name} <= %{version} -Obsoletes: php54-%{ext_name} <= %{version} -Obsoletes: php54w-%{ext_name} <= %{version} -Obsoletes: php55u-%{ext_name} <= %{version} -Obsoletes: php55w-%{ext_name} <= %{version} -Obsoletes: php56u-%{ext_name} <= %{version} -Obsoletes: php56w-%{ext_name} <= %{version} -Obsoletes: php70u-%{ext_name} <= %{version} -Obsoletes: php70w-%{ext_name} <= %{version} -%if "%{php_version}" > "7.1" -Obsoletes: php71u-%{ext_name} <= %{version} -Obsoletes: php71w-%{ext_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif - - -%description -%{summary}. - -Tarantool is an in-memory database and Lua application server. -This package provides PECL PHP driver for Tarantool/Box. - -Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. - - -%prep -%setup -qc -mv %{github_name}-%{github_commit} NTS - -cd NTS -extver=$(sed -n '/#define PHP_TARANTOOL_VERSION/{s/.* "//;s/".*$//;p}' php_tarantool.h) -if test "x${extver}" != "x%{version}%{?pre}%{?github_date:-dev}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?pre}%{?github_date:-dev}. - exit 1 -fi -cd .. - -%if %{with_zts} -cp -pr NTS ZTS -%endif - -: Ext -- Create configuration file -cat > %{ini_name} << 'INI' -; Enable tarantool extension module -extension=%{ext_name}.so - -; ----- Configuration options -;tarantool.persistent = 0 -;tarantool.use_namespace = 0 -;tarantool.connection_alias = 0 -;tarantool.timeout = '10.0' -;tarantool.request_timeout = '10.0' -;tarantool.retry_count = '1' -;tarantool.retry_sleep = '0.1' -INI - - -%build -: Ext -- NTS -pushd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} -popd - -: Ext -- ZTS -%if %{with_zts} -pushd ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} -popd -%endif - - -%install -: Ext -- NTS -make -C NTS install INSTALL_ROOT=%{buildroot} -install -D -m 0644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} - -: Ext -- ZTS -%if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 0644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - - -%check -: Extension NTS minimal load test -%{__php} --no-php-ini \ - --define extension=%{buildroot}%{php_extdir}/%{ext_name}.so \ - --modules | grep %{ext_name} - -%if %{with_zts} -: Extension ZTS minimal load test -%{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}%{php_ztsextdir}/%{ext_name}.so \ - --modules | grep %{ext_name} -%endif - - -%files -%{!?_licensedir:%global license %%doc} -%license NTS/LICENSE NTS/AUTHORS - -%config(noreplace) %{php_inidir}/%{ini_name} -%{php_extdir}/%{ext_name}.so - -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{ext_name}.so -%endif - - -%changelog -* Thu Dec 1 2016 Remi Collet - 0.2.0-2 -- rebuild with PHP 7.1.0 GA - -* Wed Nov 23 2016 Remi Collet - 0.2.0-1 -- update to 0.2.0 - -* Thu Mar 24 2016 Remi Collet - 0.1.1-0.1.20160906git27697cf -- update to git snapshot for PHP 7 - -* Thu Mar 24 2016 Remi Collet - 0.1.0-1 -- Initial package - diff --git a/php-tarantool.spec b/php-tarantool.spec index 1a14822..c6225c3 100644 --- a/php-tarantool.spec +++ b/php-tarantool.spec @@ -8,38 +8,35 @@ # Please preserve changelog entries # -%global github_owner tarantool -%global github_name tarantool-php -%global github_commit 96879c6df07c6f0ebeeee5c2c611b86fc2b7856a -%global github_short %(c=%{github_commit}; echo ${c:0:7}) - -%global ext_name tarantool -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%if "%{php_version}" < "5.6" -%global ini_name %{ext_name}.ini -%else -%global ini_name 40-%{ext_name}.ini -%endif - %if 0%{?scl:1} # PHPUnit not available in SCL -%if "%{scl}" == "rh-php56" -%global sub_prefix more-php56- -%else %global sub_prefix %{scl_prefix} -%endif -%scl_package php-%{ext_name} +%scl_package php-tarantool %else %global pkg_name %{name} %endif +%global github_owner tarantool +%global github_name tarantool-php +%global github_commit 3bf856687bc2e72a093f4c01c1f80d2bc39de928 +%global github_short %(c=%{github_commit}; echo ${c:0:7}) +#global github_date 20160906 + +%global ext_name tarantool +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global ini_name 40-%{ext_name}.ini + # Test suite requires a running server %global with_tests 0 Name: %{?sub_prefix}php-%{ext_name} -Version: 0.1.0 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 0.2.0 +%if 0%{?github_date} +Release: 0.1.%{?github_date}git%{?github_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +%else +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +%endif Summary: PHP driver for Tarantool/Box Group: Development/Libraries @@ -48,8 +45,7 @@ License: BSD URL: https://github.com/%{github_owner}/%{github_name} Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{pkg_name}-%{version}-%{github_short}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel >= 5.4 +BuildRequires: %{?scl_prefix}php-devel >= 7 %if %{with_tests} # For tests BuildRequires: %{_bindir}/phpunit @@ -69,17 +65,15 @@ Obsoletes: php53-%{ext_name} <= %{version} Obsoletes: php53u-%{ext_name} <= %{version} Obsoletes: php54-%{ext_name} <= %{version} Obsoletes: php54w-%{ext_name} <= %{version} -%if "%{php_version}" > "5.5" Obsoletes: php55u-%{ext_name} <= %{version} Obsoletes: php55w-%{ext_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" Obsoletes: php56u-%{ext_name} <= %{version} Obsoletes: php56w-%{ext_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" Obsoletes: php70u-%{ext_name} <= %{version} Obsoletes: php70w-%{ext_name} <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-%{ext_name} <= %{version} +Obsoletes: php71w-%{ext_name} <= %{version} %endif %endif @@ -101,8 +95,16 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc - mv %{github_name}-%{github_commit} NTS + +cd NTS +extver=$(sed -n '/#define PHP_TARANTOOL_VERSION/{s/.* "//;s/".*$//;p}' php_tarantool.h) +if test "x${extver}" != "x%{version}%{?pre}%{?github_date:-dev}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?pre}%{?github_date:-dev}. + exit 1 +fi +cd .. + %if %{with_zts} cp -pr NTS ZTS %endif @@ -113,8 +115,9 @@ cat > %{ini_name} << 'INI' extension=%{ext_name}.so ; ----- Configuration options -;tarantool.con_per_host = '5' -;tarantool.persistent = '0' +;tarantool.persistent = 0 +;tarantool.use_namespace = 0 +;tarantool.connection_alias = 0 ;tarantool.timeout = '10.0' ;tarantool.request_timeout = '10.0' ;tarantool.retry_count = '1' @@ -141,8 +144,6 @@ popd %install -rm -rf %{buildroot} - : Ext -- NTS make -C NTS install INSTALL_ROOT=%{buildroot} install -D -m 0644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -168,12 +169,7 @@ install -D -m 0644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license NTS/LICENSE NTS/AUTHORS @@ -187,6 +183,15 @@ rm -rf %{buildroot} %changelog -* Thu Mar 24 2016 Remi Collet - 0.1.0 +* Thu Dec 1 2016 Remi Collet - 0.2.0-2 +- rebuild with PHP 7.1.0 GA + +* Wed Nov 23 2016 Remi Collet - 0.2.0-1 +- update to 0.2.0 + +* Thu Mar 24 2016 Remi Collet - 0.1.1-0.1.20160906git27697cf +- update to git snapshot for PHP 7 + +* Thu Mar 24 2016 Remi Collet - 0.1.0-1 - Initial package -- cgit