]> git.pld-linux.org Git - packages/rocksdb.git/blame - rocksdb.spec
tbb rebuild
[packages/rocksdb.git] / rocksdb.spec
CommitLineData
d120039a 1# TODO: hdfs/java
b427c498
ER
2#
3# Conditional build:
4%bcond_with tests # build with tests
5%bcond_without static_libs # don't build static libraries
dd1b7ced 6%bcond_without tbb # Threading Building Blocks support
b427c498 7
c4a98ad2
JB
8Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
9Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
10Name: rocksdb
4eda5fd3 11Version: 6.8.1
36bc8694 12Release: 2
c4a98ad2
JB
13License: BSD
14Group: Libraries
d120039a 15#Source0Download: https://github.com/facebook/rocksdb/releases
dd1b7ced 16Source0: https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz
4eda5fd3 17# Source0-md5: 8648dbe2589748b9dff3c1fe725f210b
c4a98ad2 18Patch0: %{name}-libdir.patch
b427c498 19Patch1: make-programs.patch
dd1b7ced 20Patch2: %{name}-detect-flags.patch
4eda5fd3
JB
21Patch3: %{name}-link.patch
22URL: https://rocksdb.org/
23BuildRequires: bzip2-devel >= 1.0.8
c4a98ad2 24BuildRequires: gflags-devel
d120039a
JB
25# libtcmalloc also supported, but jemalloc is preferred
26BuildRequires: jemalloc-devel
1225ec57
JB
27%ifarch i386 i486
28BuildRequires: libatomic-devel
29%endif
c4a98ad2 30BuildRequires: libstdc++-devel >= 6:4.7
4eda5fd3 31BuildRequires: lz4-devel >= 1:1.9.2
d120039a 32BuildRequires: numactl-devel
dfb5c736 33BuildRequires: rpmbuild(macros) >= 1.734
4eda5fd3 34BuildRequires: snappy-devel >= 1.1.8
dd1b7ced
JB
35%{?with_tbb:BuildRequires: tbb-devel}
36BuildRequires: zlib-devel >= 1.2.11
4eda5fd3
JB
37BuildRequires: zstd-devel >= 1.4.4
38Requires: bzip2 >= 1.0.8
39Requires: lz4 >= 1:1.9.2
40Requires: snappy >= 1.1.8
41Requires: zlib >= 1.2.11
42Requires: zstd >= 1.4.4
c4a98ad2
JB
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46RocksDB is a Persistent Key-Value Store for Flash and RAM Storage.
47
48%description -l pl.UTF-8
49RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM.
50
51%package devel
52Summary: Header files for RocksDB library
53Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB
54Group: Development/Libraries
55Requires: %{name} = %{version}-%{release}
56Requires: libstdc++-devel >= 6:4.7
57
58%description devel
59Header files for RocksDB library.
60
61%description devel -l pl.UTF-8
62Pliki nagłówkowe biblioteki RocksDB.
63
64%package static
65Summary: Static RocksDB library
66Summary(pl.UTF-8): Statyczna biblioteka RocksDB
67Group: Development/Libraries
68Requires: %{name}-devel = %{version}-%{release}
69
70%description static
71Static RocksDB library.
72
73%description static -l pl.UTF-8
74Statyczna biblioteka RocksDB.
75
76%prep
dd1b7ced 77%setup -q
c4a98ad2 78%patch0 -p1
b427c498 79%patch1 -p1
d120039a 80%patch2 -p1
4eda5fd3 81%patch3 -p1
c4a98ad2
JB
82
83%build
1225ec57
JB
84%ifarch i386 i486
85PLATFORM_LDFLAGS="-latomic" \
86%endif
b427c498 87%{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
83ab867a 88 AM_DEFAULT_VERBOSITY=1 \
c4a98ad2
JB
89 CC="%{__cc}" \
90 CXX="%{__cxx}" \
e76d675c 91 %{!?with_debug:DEBUG_LEVEL=0} \
4907cb5a 92 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
c4a98ad2 93 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
d120039a 94 PORTABLE=1 \
dd1b7ced 95 %{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \
e76d675c 96 USE_RTTI=1 \
c4a98ad2
JB
97 WARNING_FLAGS="%{rpmcppflags} -Wall"
98
99%install
100rm -rf $RPM_BUILD_ROOT
d120039a 101
c4a98ad2 102%{__make} install \
d120039a 103 %{!?with_debug:DEBUG_LEVEL=0} \
c4a98ad2 104 INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \
b136638d
JB
105 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir}
106
107# reduntant symlink
dd1b7ced 108%{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
c4a98ad2
JB
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%post -p /sbin/ldconfig
114%postun -p /sbin/ldconfig
115
116%files
117%defattr(644,root,root,755)
dd1b7ced 118%doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
b136638d 119%attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
4eda5fd3 120%attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.8
c4a98ad2
JB
121
122%files devel
123%defattr(644,root,root,755)
b136638d 124%attr(755,root,root) %{_libdir}/librocksdb.so
c4a98ad2
JB
125%{_includedir}/rocksdb
126
b427c498 127%if %{with static_libs}
c4a98ad2
JB
128%files static
129%defattr(644,root,root,755)
130%{_libdir}/librocksdb.a
b427c498 131%endif
This page took 0.115865 seconds and 4 git commands to generate.