summaryrefslogtreecommitdiffstats
path: root/php-pecl-couchbase2.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-09-20 10:28:11 +0200
committerRemi Collet <fedora@famillecollet.com>2014-09-20 10:28:11 +0200
commitaa85b2a1c1cbed733914fd95ac781184322be5f0 (patch)
treec0c75486c2754a672e17cc25816f41dc6e2f29e2 /php-pecl-couchbase2.spec
parentd56a7cf72d5d3f62a4b976773ba0e5644577b3ab (diff)
php-pecl-couchbase2: 2.0.0 - New package
Diffstat (limited to 'php-pecl-couchbase2.spec')
-rw-r--r--php-pecl-couchbase2.spec106
1 files changed, 56 insertions, 50 deletions
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 <remi@fedoraproject.org> - 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 <remi@fedoraproject.org> - 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 <remi@fedoraproject.org> - 1.1.14-1
-- initial package
+- initial package \ No newline at end of file