[packages/rocksdb] add tests and static_libs bcond. tests fail to compile
glen
glen at pld-linux.org
Mon Aug 3 12:43:12 CEST 2015
commit b427c4984eb38b607be9437571fc5b81f1a59acf
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 3 10:10:14 2015 +0300
add tests and static_libs bcond. tests fail to compile
make-programs.patch | 11 +++++++++++
rocksdb.spec | 12 ++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/rocksdb.spec b/rocksdb.spec
index 2e7e2cc..a771855 100644
--- a/rocksdb.spec
+++ b/rocksdb.spec
@@ -1,3 +1,8 @@
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%bcond_without static_libs # don't build static libraries
+
Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
Name: rocksdb
@@ -8,6 +13,7 @@ Group: Libraries
Source0: https://github.com/facebook/rocksdb/archive/%{name}-%{version}.tar.gz
# Source0-md5: 6bdc1defb0a0d8e9e3cb11bfc6e795ef
Patch0: %{name}-libdir.patch
+Patch1: make-programs.patch
URL: http://rocksdb.org/
BuildRequires: bzip2-devel
BuildRequires: gflags-devel
@@ -55,12 +61,13 @@ Statyczna biblioteka RocksDB.
%prep
%setup -q -n %{name}-%{name}-%{version}
%patch0 -p1
+%patch1 -p1
%build
%ifarch i386 i486
PLATFORM_LDFLAGS="-latomic" \
%endif
-%{__make} all shared_lib \
+%{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
AM_DEFAULT_VERBOSITY=1 \
CC="%{__cc}" \
CXX="%{__cxx}" \
@@ -69,7 +76,6 @@ PLATFORM_LDFLAGS="-latomic" \
%install
rm -rf $RPM_BUILD_ROOT
-
%{__make} install \
INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \
INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
@@ -90,6 +96,8 @@ rm -rf $RPM_BUILD_ROOT
%doc doc/*
%{_includedir}/rocksdb
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/librocksdb.a
+%endif
diff --git a/make-programs.patch b/make-programs.patch
new file mode 100644
index 0000000..d732363
--- /dev/null
+++ b/make-programs.patch
@@ -0,0 +1,11 @@
+--- rocksdb-rocksdb-3.10.2/Makefile~ 2015-08-01 23:39:38.000000000 +0300
++++ rocksdb-rocksdb-3.10.2/Makefile 2015-08-03 09:54:26.746538265 +0300
+@@ -316,6 +316,8 @@
+
+ all: $(LIBRARY) $(PROGRAMS) $(TESTS)
+
++programs: $(PROGRAMS)
++
+ static_lib: $(LIBRARY)
+
+ shared_lib: $(SHARED)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rocksdb.git/commitdiff/b427c4984eb38b607be9437571fc5b81f1a59acf
More information about the pld-cvs-commit
mailing list