summaryrefslogtreecommitdiffstats
path: root/libcouchbase.spec
diff options
context:
space:
mode:
Diffstat (limited to 'libcouchbase.spec')
-rw-r--r--libcouchbase.spec109
1 files changed, 79 insertions, 30 deletions
diff --git a/libcouchbase.spec b/libcouchbase.spec
index 0ceba5f..a616ef1 100644
--- a/libcouchbase.spec
+++ b/libcouchbase.spec
@@ -7,6 +7,15 @@
# Please, preserve the changelog entries
#
+%global libname libcouchbase
+%global soname 2
+
+%if 0%{?fedora} < 34 && 0%{?rhel} < 7
+%bcond_with rename
+%else
+%bcond_without rename
+%endif
+
%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8
%bcond_without tests
%else
@@ -14,27 +23,31 @@
%bcond_with tests
%endif
-%global with_dtrace 1
+%bcond_without dtrace
%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7
-%global with_uv 1
+%bcond_without uv
%else
-%global with_uv 0
+%bcond_with uv
%endif
-Name: libcouchbase
+%if %{with rename}
+Name: %{libname}%{soname}
+%else
+Name: %{libname}
+%endif
Version: 2.10.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Couchbase client library
Group: System Environment/Libraries
License: ASL 2.0
URL: http://www.couchbase.com/communities/c/getting-started
-Source0: http://packages.couchbase.com/clients/c/%{name}-%{version}.tar.gz
-
-Patch0: %{name}-0001-enforce-system-crypto-policies.patch
-Patch1: %{name}-0002-do-not-install-plugins-into-libdir.patch
-Patch2: %{name}-0003-fix-pkgconfig-paths.patch
+Source0: http://packages.couchbase.com/clients/c/%{libname}-%{version}.tar.gz
+Patch0: %{libname}-0001-enforce-system-crypto-policies.patch
+Patch1: %{libname}-0002-do-not-install-plugins-into-libdir.patch
+Patch2: %{libname}-0003-fix-pkgconfig-paths.patch
+Patch3: %{libname}-0004-add-LCB_PLUGINS_DIR-option-to-set-directory-for-IO-p.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@@ -43,10 +56,10 @@ BuildRequires: openssl-devel
BuildRequires: cmake >= 2.8.9
BuildRequires: pkgconfig(libevent) >= 2.0.20
BuildRequires: libev-devel >= 3
-%if %{with_uv}
+%if %{with uv}
BuildRequires: pkgconfig(libuv) >= 1
%endif
-%if %{with_dtrace}
+%if %{with dtrace}
BuildRequires: systemtap-sdt-devel >= 1.8
BuildRequires: systemtap-devel
%endif
@@ -58,6 +71,9 @@ Suggests: %{name}-tools%{_isa} = %{version}-%{release}
%else
Requires: %{name}-libevent%{_isa} = %{version}-%{release}
%endif
+%if %{without rename}
+Obsoletes: %{libname}%{soname} < %{version}-%{release}
+%endif
# Filter shared private badly named
%{?filter_provides_in: %filter_provides_in %{name}/%{name}.*\.so$}
@@ -73,12 +89,21 @@ HTTP transport.
This Couchbase Client Library for C and C++ provides a complete interface
to the functionality of Couchbase Server.
+%if %{with rename}
+This package is designed for parallel installation with libcouchbase
+%endif
%package devel
Summary: Development files for Couchbase client library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{with rename}
+Conflicts: %{libname}-devel < %{version}
+Provides: %{libname}-devel = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-devel < %{version}-%{release}
+%endif
%description devel
The %{name}-devel package contains libraries and header files for
@@ -89,28 +114,37 @@ developing applications that use %{name}.
Summary: Couchbase client library - libevent IO back-end
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{without rename}
+Obsoletes: %{libname}%{soname}-libevent < %{version}-%{release}
+%endif
%description libevent
-This package provides libevent back-end for libcouchbase.
+This package provides libevent back-end for %{name}.
%package libev
Summary: Couchbase client library - libev IO back-end
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{without rename}
+Obsoletes: %{libname}%{soname}-libev < %{version}-%{release}
+%endif
%description libev
-This package provides libev back-end for libcouchbase.
+This package provides libev back-end for %{name}.
-%if %{with_uv}
+%if %{with uv}
%package libuv
Summary: Couchbase client library - libuv IO back-end
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{without rename}
+Obsoletes: %{libname}%{soname}-libuv < %{version}-%{release}
+%endif
%description libuv
-This package provides libuv back-end for libcouchbase.
+This package provides libuv back-end for %{name}.
%endif
@@ -119,6 +153,12 @@ Summary: Couchbase tools
Group: Applications/System
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libevent%{?_isa} = %{version}-%{release}
+%if %{with rename}
+Conflicts: %{libname}-tools < %{version}
+Provides: %{libname}-tools = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-tools < %{version}-%{release}
+%endif
%description tools
The %{name}-tools package contains some command line tools to manage
@@ -126,27 +166,29 @@ a Couchbase Server.
%prep
-%setup -q
+%setup -q -n %{libname}-%{version}
%patch0 -p1 -b .crypto
%patch1 -p1 -b .plug
%patch2 -p1 -b .pkgc
+%patch3 -p1 -b .plugdir
%build
%cmake \
-DLCB_BUILD_LIBEVENT=ON \
-DLCB_BUILD_LIBEV=ON \
-%if %{with_uv}
+%if %{with uv}
-DLCB_BUILD_LIBUV=ON \
%else
-DLCB_BUILD_LIBUV=OFF \
%endif
-%if %{with_dtrace}
+%if %{with dtrace}
-DLCB_BUILD_DTRACE=ON \
%else
-DLCB_BUILD_DTRACE=OFF \
%endif
-DLCB_NO_MOCK=1 \
+ -DLCB_PLUGINS_DIR:STRING=%{name} \
-B . -S .
make %{?_smp_mflags} V=1
@@ -176,26 +218,27 @@ make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
%{!?_licensedir:%global license %%doc}
%doc README.markdown RELEASE_NOTES.markdown
%license LICENSE
-%{_libdir}/%{name}.so.2*
-%if %{with_dtrace}
-%{_datadir}/systemtap/tapset/libcouchbase.so*
+%{_libdir}/%{libname}.so.%{soname}*
+%if %{with dtrace}
+%{_datadir}/systemtap/tapset/%{libname}.so*
%endif
+%dir %{_libdir}/%{name}
%files libevent
-%{_libdir}/%{name}/%{name}_libevent.so
+%{_libdir}/%{name}/%{libname}_libevent.so
%files libev
-%{_libdir}/%{name}/%{name}_libev.so
+%{_libdir}/%{name}/%{libname}_libev.so
-%if %{with_uv}
+%if %{with uv}
%files libuv
-%{_libdir}/%{name}/%{name}_libuv.so
+%{_libdir}/%{name}/%{libname}_libuv.so
%endif
%files devel
-%{_includedir}/%{name}
-%{_libdir}/%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
+%{_includedir}/%{libname}
+%{_libdir}/%{libname}.so
+%{_libdir}/pkgconfig/%{libname}.pc
%files tools
%{_bindir}/cbc*
@@ -204,7 +247,13 @@ make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
%changelog
-* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.10.7-1
+* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 2.10.8-2
+- rename to libcouchbase2 to allow parallel installation with libcouchbase v3
+- relocate IO plugins installation using patch from
+ https://github.com/couchbase/libcouchbase/pull/38
+
+
+* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.10.8-1
- update to 2.10.8
* Wed Jun 17 2020 Remi Collet <remi@remirepo.net> - 2.10.7-1