From aa85b2a1c1cbed733914fd95ac781184322be5f0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 20 Sep 2014 10:28:11 +0200 Subject: php-pecl-couchbase2: 2.0.0 - New package --- LICENSE | 1351 ++++++++++++++++++++++++++++++++++++++++++++++ REFLECTION | 229 ++++++++ php-pecl-couchbase2.spec | 106 ++-- 3 files changed, 1636 insertions(+), 50 deletions(-) create mode 100644 LICENSE create mode 100644 REFLECTION diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..08bca68 --- /dev/null +++ b/LICENSE @@ -0,0 +1,1351 @@ + + + + + + + + + + + + + php-couchbase/LICENSE at master · couchbaselabs/php-couchbase · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content +
+ + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+ + + +

+ + /php-couchbase + + + + + + + forked from brett19/php-couchbase + +

+
+
+ +
+
+
+ +
+
+ +
+ + + +
+
+ +
+ + +
+

HTTPS clone URL

+
+ + + + +
+
+ + +
+

Subversion checkout URL

+
+ + + + +
+
+ + +

You can clone with + HTTPS + or Subversion. + + + +

+ + + + + + Download ZIP + +
+
+ +
+ + + + + + +
+ +
+ + + branch: + master + + + +
+ +
+ + + + +
+ + +
+ + +
+
+ Fetching contributors… +
+ +
+

+

Cannot retrieve contributors at this time

+
+
+ +
+
+
+
+ 203 lines (169 sloc) + + 11.358 kb +
+
+
+ Raw + Blame + History +
+ + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
1. Definitions.
+
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
+
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
+
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
+
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
+
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
+
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
+
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
+
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
+
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
+
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
+
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
+
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
+
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
+
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
+
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
+
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
+
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
+
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
+
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
+
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
+
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
+
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
+
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
+
END OF TERMS AND CONDITIONS
+
APPENDIX: How to apply the Apache License to your work.
+
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
+
Copyright [yyyy] [name of copyright owner]
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+ +
+ +
+
+ +Jump to Line + + +
+ +
+ +
+
+ + +
+ +
+ +
+ + +
+
+
+ +
+
+ +
+ + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + + diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..474da74 --- /dev/null +++ b/REFLECTION @@ -0,0 +1,229 @@ +Extension [ extension #16 couchbase version 2.0.0 ] { + + - Constants [57] { + Constant [ integer COUCHBASE_PERSISTTO_MASTER ] { 1 } + Constant [ integer COUCHBASE_PERSISTTO_ONE ] { 1 } + Constant [ integer COUCHBASE_PERSISTTO_TWO ] { 2 } + Constant [ integer COUCHBASE_PERSISTTO_THREE ] { 4 } + Constant [ integer COUCHBASE_REPLICATETO_ONE ] { 16 } + Constant [ integer COUCHBASE_REPLICATETO_TWO ] { 32 } + Constant [ integer COUCHBASE_REPLICATETO_THREE ] { 64 } + Constant [ integer COUCHBASE_CNTL_OP_TIMEOUT ] { 0 } + Constant [ integer COUCHBASE_CNTL_VIEW_TIMEOUT ] { 1 } + Constant [ integer COUCHBASE_CNTL_DURABILITY_INTERVAL ] { 14 } + Constant [ integer COUCHBASE_CNTL_DURABILITY_TIMEOUT ] { 13 } + Constant [ integer COUCHBASE_CNTL_HTTP_TIMEOUT ] { 15 } + Constant [ integer COUCHBASE_CNTL_CONFIGURATION_TIMEOUT ] { 18 } + Constant [ integer COUCHBASE_CNTL_CONFDELAY_THRESH ] { 25 } + Constant [ integer COUCHBASE_CNTL_CONFIG_NODE_TIMEOUT ] { 27 } + Constant [ integer COUCHBASE_CNTL_HTCONFIG_IDLE_TIMEOUT ] { 28 } + Constant [ integer COUCHBASE_SUCCESS ] { 0 } + Constant [ integer COUCHBASE_AUTH_CONTINUE ] { 1 } + Constant [ integer COUCHBASE_AUTH_ERROR ] { 2 } + Constant [ integer COUCHBASE_DELTA_BADVAL ] { 3 } + Constant [ integer COUCHBASE_E2BIG ] { 4 } + Constant [ integer COUCHBASE_EBUSY ] { 5 } + Constant [ integer COUCHBASE_ENOMEM ] { 8 } + Constant [ integer COUCHBASE_ERANGE ] { 9 } + Constant [ integer COUCHBASE_ERROR ] { 10 } + Constant [ integer COUCHBASE_ETMPFAIL ] { 11 } + Constant [ integer COUCHBASE_EINVAL ] { 7 } + Constant [ integer COUCHBASE_CLIENT_ETMPFAIL ] { 27 } + Constant [ integer COUCHBASE_KEY_EEXISTS ] { 12 } + Constant [ integer COUCHBASE_KEY_ENOENT ] { 13 } + Constant [ integer COUCHBASE_DLOPEN_FAILED ] { 14 } + Constant [ integer COUCHBASE_DLSYM_FAILED ] { 15 } + Constant [ integer COUCHBASE_NETWORK_ERROR ] { 16 } + Constant [ integer COUCHBASE_NOT_MY_VBUCKET ] { 17 } + Constant [ integer COUCHBASE_NOT_STORED ] { 18 } + Constant [ integer COUCHBASE_NOT_SUPPORTED ] { 19 } + Constant [ integer COUCHBASE_UNKNOWN_COMMAND ] { 20 } + Constant [ integer COUCHBASE_UNKNOWN_HOST ] { 21 } + Constant [ integer COUCHBASE_PROTOCOL_ERROR ] { 22 } + Constant [ integer COUCHBASE_ETIMEDOUT ] { 23 } + Constant [ integer COUCHBASE_BUCKET_ENOENT ] { 25 } + Constant [ integer COUCHBASE_CLIENT_ENOMEM ] { 26 } + Constant [ integer COUCHBASE_CONNECT_ERROR ] { 24 } + Constant [ integer COUCHBASE_EBADHANDLE ] { 28 } + Constant [ integer COUCHBASE_SERVER_BUG ] { 29 } + Constant [ integer COUCHBASE_PLUGIN_VERSION_MISMATCH ] { 30 } + Constant [ integer COUCHBASE_INVALID_HOST_FORMAT ] { 31 } + Constant [ integer COUCHBASE_INVALID_CHAR ] { 32 } + Constant [ integer COUCHBASE_DURABILITY_ETOOMANY ] { 33 } + Constant [ integer COUCHBASE_DUPLICATE_COMMANDS ] { 34 } + Constant [ integer COUCHBASE_EINTERNAL ] { 6 } + Constant [ integer COUCHBASE_NO_MATCHING_SERVER ] { 35 } + Constant [ integer COUCHBASE_BAD_ENVIRONMENT ] { 36 } + Constant [ integer COUCHBASE_VALUE_F_JSON ] { 1 } + Constant [ integer COUCHBASE_TMPFAIL ] { 11 } + Constant [ integer COUCHBASE_KEYALREADYEXISTS ] { 12 } + Constant [ integer COUCHBASE_KEYNOTFOUND ] { 13 } + } + + - Classes [4] { + Class [ class CouchbaseException extends Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + 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 _CouchbaseCluster ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ public method __construct ] { + } + + Method [ public method connect ] { + } + + Method [ public method http_request ] { + } + } + } + + Class [ class CouchbaseMetaDoc ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ public $error ] + Property [ public $value ] + Property [ public $flags ] + Property [ public $cas ] + } + + - Methods [0] { + } + } + + Class [ class _CouchbaseBucket ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [15] { + Method [ public method __construct ] { + } + + Method [ public method insert ] { + } + + Method [ public method upsert ] { + } + + Method [ public method replace ] { + } + + Method [ public method remove ] { + } + + Method [ public method get ] { + } + + Method [ public method getFromReplica ] { + } + + Method [ public method counter ] { + } + + Method [ public method flush ] { + } + + Method [ public method unlock ] { + } + + Method [ public method http_request ] { + } + + Method [ public method durability ] { + } + + Method [ public method setTranscoder ] { + } + + Method [ public method setOption ] { + } + + Method [ public method getOption ] { + } + } + } + } +} + diff --git a/php-pecl-couchbase2.spec b/php-pecl-couchbase2.spec index ad9945f..7dcf1ea 100644 --- a/php-pecl-couchbase2.spec +++ b/php-pecl-couchbase2.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-couchbase +# spec file for php-pecl-couchbase2 # # Copyright (c) 2013-2014 Remi Collet # License: CC-BY-SA @@ -7,70 +7,69 @@ # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-couchbase} +%{?scl: %scl_package php-pecl-couchbase2} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} %global pecl_name couchbase %global with_zts 0%{?__ztsphp:1} -%global with_fastlz 1 %if "%{php_version}" < "5.6" # After igbinary %global ini_name z-%{pecl_name}.ini %else -# After 40-igbinary +# After 40-igbinary and 40-json %global ini_name 50-%{pecl_name}.ini %endif Summary: Couchbase Server PHP extension -Name: %{?scl_prefix}php-pecl-couchbase -Version: 1.2.2 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Name: %{?scl_prefix}php-pecl-couchbase2 +Version: 2.0.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: pecl.php.net/package/couchbase Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?svnrev:-dev}.tgz - -# https://github.com/couchbase/php-ext-couchbase/pull/11 -Patch0: %{pecl_name}-fastlz.patch +# http://www.couchbase.com/issues/browse/PCBC-292 +Source1: https://github.com/couchbaselabs/php-couchbase/blob/master/LICENSE BuildRequires: %{?scl_prefix}php-devel >= 5.3.0 -BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel BuildRequires: %{?scl_prefix}php-pear -BuildRequires: zlib-devel BuildRequires: libcouchbase-devel -# for tests -BuildRequires: %{?scl_prefix}php-json -%if %{with_fastlz} -BuildRequires: fastlz-devel -%endif Requires(post): %{__pecl} Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -Requires: %{?scl_prefix}php-pecl-igbinary%{?_isa} +# used in embded php code +# TODO fastlz http://www.couchbase.com/issues/browse/PCBC-293 +Requires: %{?scl_prefix}php-igbinary%{?_isa} +Requires: %{?scl_prefix}php-json%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# Only 1 version can be installed +Conflicts: %{?scl_prefix}php-pecl-couchbase < 2 +# http://www.couchbase.com/issues/browse/PCBC-294 +Conflicts: %{?scl_prefix}php-pecl-xdebug %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} +Obsoletes: php53-pecl-%{pecl_name}2 <= %{version} +Obsoletes: php53u-pecl-%{pecl_name}2 <= %{version} +Obsoletes: php54-pecl-%{pecl_name}2 <= %{version} +Obsoletes: php54w-pecl-%{pecl_name}2 <= %{version} %if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} +Obsoletes: php55u-pecl-%{pecl_name}2 <= %{version} +Obsoletes: php55w-pecl-%{pecl_name}2 <= %{version} %endif %if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +Obsoletes: php56u-pecl-%{pecl_name}2 <= %{version} +Obsoletes: php56w-pecl-%{pecl_name}2 <= %{version} %endif %endif @@ -85,6 +84,14 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} The PHP client library provides fast access to documents stored in a Couchbase Server. +%{?scl_prefix}php-pecl-couchbase provides API version 1. +This package provides API version 2. + +Documentation: +http://docs.couchbase.com/prebuilt/php-sdk-2.0/topics/overview.html + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. + %prep %setup -q -c @@ -92,14 +99,7 @@ in a Couchbase Server. mv %{pecl_name}-%{version} NTS cd NTS -%patch0 -p1 -b .fastlz -%if %{with_fastlz} -rm -r fastlz -sed -e '/name="fastlz/d' -i ../package.xml -%endif - -# Fix version -sed -e '/PHP_COUCHBASE_VERSION/s/1.2.0/%{version}/' -i php_couchbase.h +cp %{SOURCE1} . # Sanity check, really often broken extver=$(sed -n '/#define PHP_COUCHBASE_VERSION/{s/.* "//;s/".*$//;p}' php_couchbase.h) @@ -109,6 +109,11 @@ if test "x${extver}" != "x%{version}"; then fi cd .. +cat << 'EOF' | tee %{ini_name} +; Enable %{pecl_name} extension module +extension=%{pecl_name}.so +EOF + %if 0%{?__ztsphp:1} # duplicate for ZTS build cp -pr NTS ZTS @@ -120,9 +125,6 @@ cp -pr NTS ZTS %build peclconf() { %configure \ -%if %{with_fastlz} - --with-system-fastlz \ -%endif --with-php-config=$1 } @@ -142,20 +144,20 @@ make %{?_smp_mflags} %install # Install the NTS stuff make install -C NTS INSTALL_ROOT=%{buildroot} -install -D -m 644 NTS/example/%{pecl_name}.ini %{buildroot}%{php_inidir}/%{ini_name} +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install the ZTS stuff %if %{with_zts} make install -C ZTS INSTALL_ROOT=%{buildroot} -install -D -m 644 ZTS/example/%{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{ini_name} +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Install the package XML file -install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml +install -D -m 644 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Test & Documentation cd NTS -for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +for i in LICENSE $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -163,18 +165,13 @@ done %check : minimal NTS load test %{__php} -n \ - -d extension=igbinary.so \ - -d extension=json.so \ - -d extension=NTS/modules/%{pecl_name}.so \ + -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ -m | grep %{pecl_name} %if %{with_zts} : minimal ZTS load test -ln -sf %{php_ztsextdir}/{json,igbinary}.so ZTS/modules/ -%{__ztsphp} -n \ - -d extension=igbinary.so \ - -d extension=json.so \ - -d extension=ZTS/modules/%{pecl_name}.so \ +%{__ztsphp} -n \ + -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ -m | grep %{pecl_name} %endif @@ -190,6 +187,8 @@ fi %files +%defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -204,6 +203,13 @@ fi %changelog +* Sat Sep 20 2014 Remi Collet - 2.0.0-1 +- rename to php-pecl-couchbase2 for new API +- update to 2.0.0 +- open http://www.couchbase.com/issues/browse/PCBC-292 license +- open http://www.couchbase.com/issues/browse/PCBC-293 fastlz +- open http://www.couchbase.com/issues/browse/PCBC-294 xdebug + * Sat Sep 6 2014 Remi Collet - 1.2.2-3 - test build with system fastlz @@ -231,4 +237,4 @@ fi - update to 1.1.15 (no change) * Fri Mar 22 2013 Remi Collet - 1.1.14-1 -- initial package +- initial package \ No newline at end of file -- cgit