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