summaryrefslogtreecommitdiffstats
path: root/libcouchbase.spec
diff options
context:
space:
mode:
Diffstat (limited to 'libcouchbase.spec')
-rw-r--r--libcouchbase.spec123
1 files changed, 105 insertions, 18 deletions
diff --git a/libcouchbase.spec b/libcouchbase.spec
index 0681c77..144298a 100644
--- a/libcouchbase.spec
+++ b/libcouchbase.spec
@@ -7,13 +7,28 @@
# Please, preserve the changelog entries
#
-# Tests require some need which are downloaded during make
+%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8
+%global with_tests 0%{!?_without_tests:1}
+%else
+# check-select-sock-tests hangs (btw, libevent backend is mandatory)
%global with_tests 0%{?_with_tests:1}
+%endif
+
+# Dtrace breaks parallel build - not enabled in Fedora package
+%global with_dtrace 0
+
+%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7
+%global with_uv 1
+%else
+%global with_uv 0
+%endif
-%global with_dtrace 1
+# Notices:
+# snappy supported but not enabled by default (upstream)
+# hdrhistrogram suppoort seems broken, so not enabled
Name: libcouchbase
-Version: 2.8.1
+Version: 2.8.2
Release: 1%{?dist}
Summary: Couchbase client library
Group: System Environment/Libraries
@@ -21,16 +36,30 @@ 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: 0001-enforce-system-crypto-policies.patch
+Patch1: 0002-do-not-install-plugins-into-libdir.patch
+Patch2: 0003-fix-pkgconfig-paths.patch
+
BuildRequires: libtool
BuildRequires: openssl-devel
-BuildRequires: cyrus-sasl-devel
BuildRequires: cmake >= 2.8.9
BuildRequires: pkgconfig(libevent) >= 2.0.20
BuildRequires: libev-devel >= 3
+%if %{with_uv}
+BuildRequires: pkgconfig(libuv) >= 1
+%endif
%if %{with_dtrace}
BuildRequires: systemtap-sdt-devel >= 1.8
%endif
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
+Recommends: %{name}-libevent%{_isa} = %{version}-%{release}
+Suggests: %{name}-libev%{_isa} = %{version}-%{release}
+Suggests: %{name}-tools%{_isa} = %{version}-%{release}
+%else
+Requires: %{name}-libevent%{_isa} = %{version}-%{release}
+%endif
+
%description
The C library provides fast access to documents in Couchbase Server 2.0.
@@ -53,10 +82,40 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
+%package libevent
+Summary: Couchbase client library - libevent IO back-end
+Group: System Environment/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description libevent
+This package provides libevent back-end for libcouchbase.
+
+
+%package libev
+Summary: Couchbase client library - libev IO back-end
+Group: System Environment/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description libev
+This package provides libev back-end for libcouchbase.
+
+
+%if %{with_uv}
+%package libuv
+Summary: Couchbase client library - libuv IO back-end
+Group: System Environment/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description libuv
+This package provides libuv back-end for libcouchbase.
+%endif
+
+
%package tools
Summary: Couchbase tools
Group: Applications/System
Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}-libevent%{?_isa} = %{version}-%{release}
%description tools
The %{name}-tools package contains some command line tools to manage
@@ -65,12 +124,26 @@ a Couchbase Server.
%prep
%setup -q
+%patch0 -p1 -b .crypto
+%patch1 -p1 -b .plug
+%patch2 -p1 -b .pkgc
%build
%cmake \
- -DLCB_NO_TESTS=1 \
- -DLCB_BUILD_LIBUV=OFF
+ -DLCB_BUILD_LIBEVENT=ON \
+ -DLCB_BUILD_LIBEV=ON \
+%if %{with_uv}
+ -DLCB_BUILD_LIBUV=ON \
+%else
+ -DLCB_BUILD_LIBUV=OFF \
+%endif
+%if %{with_dtrace}
+ -DLCB_BUILD_DTRACE=ON \
+%else
+ -DLCB_BUILD_DTRACE=OFF \
+%endif
+ -DLCB_NO_MOCK=1
make %{?_smp_mflags} V=1
@@ -78,32 +151,38 @@ make %{?_smp_mflags} V=1
%install
make install DESTDIR=%{buildroot}
-# Remove uneeded files
-rm -f %{buildroot}%{_libdir}/*.la
-
%check
%if %{with_tests}
-make check
+make test
%else
-: check disabled, missing '--with tests' option
+: check disabled
%endif
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+
%files
%{!?_licensedir:%global license %%doc}
+%doc README.markdown RELEASE_NOTES.markdown
%license LICENSE
%{_libdir}/%{name}.so.2*
-# Backends
-%{_libdir}/%{name}_libevent.so
-%{_libdir}/%{name}_libev.so
+
+%files libevent
+%{_libdir}/%{name}/%{name}_libevent.so
+
+%files libev
+%{_libdir}/%{name}/%{name}_libev.so
+
+%if %{with_uv}
+%files libuv
+%{_libdir}/%{name}/%{name}_libuv.so
+%endif
%files devel
-%doc RELEASE_NOTES.markdown
%{_includedir}/%{name}
-#{_mandir}/man3/libcouch*
-#{_mandir}/man3/lcb*
-#{_mandir}/man5/lcb*
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
@@ -114,6 +193,14 @@ make check
%changelog
+* Thu Nov 2 2017 Remi Collet <remi@remirepo.net> - 2.8.2-1
+- update to 2.8.2
+- pull patches and other changes from Fedora
+- add libuv backend
+- move backends in optional sub-packages
+- enable upstream test suite on F25+
+- disable dtrace
+
* Wed Sep 20 2017 Remi Collet <remi@remirepo.net> - 2.8.1-1
- update to 2.8.1