diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-09-29 11:08:29 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-09-29 11:08:29 +0200 |
commit | 02b8d2f45f59840463b0afe0030f5c0280ea0871 (patch) | |
tree | bac047fcb6b81f288a0aaa17f1d64dd198d96d8b | |
parent | 989094157dadb6a2440f8439f8e4a9d99f49e56a (diff) |
php-tarantool: dup the spec
-rw-r--r-- | REFLECTION-DEV | 109 | ||||
-rw-r--r-- | php-tarantool-dev.spec | 192 |
2 files changed, 301 insertions, 0 deletions
diff --git a/REFLECTION-DEV b/REFLECTION-DEV new file mode 100644 index 0000000..a4fd1a9 --- /dev/null +++ b/REFLECTION-DEV @@ -0,0 +1,109 @@ +Extension [ <persistent> extension #16 tarantool version 1.0 ] { + + - INI { + Entry [ tarantool.con_per_host <SYSTEM> ] + Current = '5' + } + Entry [ tarantool.persistent <SYSTEM> ] + Current = '0' + } + Entry [ tarantool.timeout <ALL> ] + Current = '10.0' + } + Entry [ tarantool.request_timeout <ALL> ] + Current = '10.0' + } + Entry [ tarantool.retry_count <ALL> ] + Current = '1' + } + Entry [ tarantool.retry_sleep <ALL> ] + 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 [1] { + Class [ <internal:tarantool> class Tarantool ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [17] { + Method [ <internal:tarantool, ctor> public method __construct ] { + } + + Method [ <internal:tarantool> public method connect ] { + } + + Method [ <internal:tarantool> public method close ] { + } + + Method [ <internal:tarantool> public method flush_schema ] { + } + + Method [ <internal:tarantool> public method authenticate ] { + } + + Method [ <internal:tarantool> public method ping ] { + } + + Method [ <internal:tarantool> public method select ] { + } + + Method [ <internal:tarantool> public method insert ] { + } + + Method [ <internal:tarantool> public method replace ] { + } + + Method [ <internal:tarantool> public method call ] { + } + + Method [ <internal:tarantool> public method eval ] { + } + + Method [ <internal:tarantool> public method delete ] { + } + + Method [ <internal:tarantool> public method update ] { + } + + Method [ <internal:tarantool> public method upsert ] { + } + + Method [ <internal:tarantool> public method evaluate ] { + } + + Method [ <internal:tarantool> public method flushSchema ] { + } + + Method [ <internal:tarantool> public method disconnect ] { + } + } + } + } +} + diff --git a/php-tarantool-dev.spec b/php-tarantool-dev.spec new file mode 100644 index 0000000..b4e8d4b --- /dev/null +++ b/php-tarantool-dev.spec @@ -0,0 +1,192 @@ +# remirepo spec file for php-tarantool +# +# Copyright (c) 2016 Remi Collet +# +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# 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} + +%else +%global pkg_name %{name} +%endif + +# 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;')}} +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 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: %{?scl_prefix}php-devel >= 5.4 +%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} +# 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} +%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} +%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 +%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.con_per_host = '5' +;tarantool.persistent = '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 +rm -rf %{buildroot} + +: 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 + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%{!?_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 Mar 24 2016 Remi Collet <remi@fedoraproject.org> - 0.1.0 +- Initial package + |