]> git.pld-linux.org Git - packages/rocksdb.git/commitdiff
add tests and static_libs bcond. tests fail to compile
authorElan Ruusamäe <glen@delfi.ee>
Mon, 3 Aug 2015 07:10:14 +0000 (10:10 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 3 Aug 2015 07:10:25 +0000 (10:10 +0300)
make-programs.patch [new file with mode: 0644]
rocksdb.spec

diff --git a/make-programs.patch b/make-programs.patch
new file mode 100644 (file)
index 0000000..d732363
--- /dev/null
@@ -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)
index 2e7e2cc12c38c68f923a7acb17a73164a103ed21..a771855bb7f075a4cff291c6872408ff0a7a4b4d 100644 (file)
@@ -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
This page took 0.069408 seconds and 4 git commands to generate.