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