X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rocksdb.spec;h=8f4c1e834c51955007dedd63ceefe9a4a909ad21;hb=dd1b7cedefb37e220f28a6d9e4ea0995b0e0ada5;hp=2d4cb77833d5162397439f324ddd8abebb9ab75c;hpb=0d1ecc7601932778694c0a7f75468c545afef584;p=packages%2Frocksdb.git diff --git a/rocksdb.spec b/rocksdb.spec index 2d4cb77..8f4c1e8 100644 --- a/rocksdb.spec +++ b/rocksdb.spec @@ -1,21 +1,39 @@ +# TODO: hdfs/java +# +# Conditional build: +%bcond_with tests # build with tests +%bcond_without static_libs # don't build static libraries +%bcond_without tbb # Threading Building Blocks support + 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 -Version: 3.6.1 +Version: 6.0.2 Release: 1 License: BSD Group: Libraries -Source0: https://github.com/facebook/rocksdb/archive/%{name}-%{version}.tar.gz -# Source0-md5: 57536681f119049c19d71f2d6711da3b +#Source0Download: https://github.com/facebook/rocksdb/releases +Source0: https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: a8f2f594182e97a08629bcc66dfd3fa0 Patch0: %{name}-libdir.patch +Patch1: make-programs.patch +Patch2: %{name}-detect-flags.patch URL: http://rocksdb.org/ -BuildRequires: bzip2-devel +BuildRequires: bzip2-devel >= 1.0.6 BuildRequires: gflags-devel +# libtcmalloc also supported, but jemalloc is preferred +BuildRequires: jemalloc-devel +%ifarch i386 i486 +BuildRequires: libatomic-devel +%endif BuildRequires: libstdc++-devel >= 6:4.7 -BuildRequires: libtcmalloc-devel -BuildRequires: lz4-devel -BuildRequires: snappy-devel -BuildRequires: zlib-devel +BuildRequires: lz4-devel >= 1:1.8.3 +BuildRequires: numactl-devel +BuildRequires: rpmbuild(macros) >= 1.734 +BuildRequires: snappy-devel >= 1.1.7 +%{?with_tbb:BuildRequires: tbb-devel} +BuildRequires: zlib-devel >= 1.2.11 +BuildRequires: zstd-devel >= 1.3.7 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -50,22 +68,36 @@ Static RocksDB library. Statyczna biblioteka RocksDB. %prep -%setup -q -n %{name}-%{name}-%{version} +%setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build -%{__make} all shared_lib \ +%ifarch i386 i486 +PLATFORM_LDFLAGS="-latomic" \ +%endif +%{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \ + AM_DEFAULT_VERBOSITY=1 \ CC="%{__cc}" \ CXX="%{__cxx}" \ + %{!?with_debug:DEBUG_LEVEL=0} + EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \ OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \ + PORTABLE=1 \ + %{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \ WARNING_FLAGS="%{rpmcppflags} -Wall" %install rm -rf $RPM_BUILD_ROOT %{__make} install \ + %{!?with_debug:DEBUG_LEVEL=0} \ INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \ - INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ + INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} + +# reduntant symlink +%{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6 %clean rm -rf $RPM_BUILD_ROOT @@ -75,14 +107,17 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc HISTORY.md LICENSE PATENTS README.md ROCKSDB_LITE.md -%attr(755,root,root) %{_libdir}/librocksdb.so +%doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md +%attr(755,root,root) %{_libdir}/librocksdb.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.0 %files devel %defattr(644,root,root,755) -%doc doc/* +%attr(755,root,root) %{_libdir}/librocksdb.so %{_includedir}/rocksdb +%if %{with static_libs} %files static %defattr(644,root,root,755) %{_libdir}/librocksdb.a +%endif