]> git.pld-linux.org Git - packages/rocksdb.git/blame - rocksdb.spec
- debug for missing shared install on builders
[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
1225ec57
JB
90%ifarch i386 i486
91PLATFORM_LDFLAGS="-latomic" \
92%endif
578f0abc 93%{__make} shared_lib %{?with_static_libs:static_lib} tools tools_lib %{?with_tests:check} \
83ab867a 94 AM_DEFAULT_VERBOSITY=1 \
c4a98ad2
JB
95 CC="%{__cc}" \
96 CXX="%{__cxx}" \
e76d675c 97 %{!?with_debug:DEBUG_LEVEL=0} \
4907cb5a 98 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
c4a98ad2 99 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
d120039a 100 PORTABLE=1 \
e76d675c 101 USE_RTTI=1 \
c4a98ad2
JB
102 WARNING_FLAGS="%{rpmcppflags} -Wall"
103
104%install
105rm -rf $RPM_BUILD_ROOT
d120039a 106
578f0abc
JB
107%if %{without benchmark}
108export ROCKSDB_DISABLE_BENCHMARK=1
109%endif
110%if %{without tbb}
111export ROCKSDB_DISABLE_TBB=1
112%endif
113
37566e73
JB
114ls -la
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 122
37566e73
JB
123ls -la
124
b136638d 125# reduntant symlink
dd1b7ced 126%{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
c4a98ad2
JB
127
128%clean
129rm -rf $RPM_BUILD_ROOT
130
131%post -p /sbin/ldconfig
132%postun -p /sbin/ldconfig
133
134%files
135%defattr(644,root,root,755)
dd1b7ced 136%doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
b136638d 137%attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
578f0abc 138%attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.29
c4a98ad2
JB
139
140%files devel
141%defattr(644,root,root,755)
b136638d 142%attr(755,root,root) %{_libdir}/librocksdb.so
c4a98ad2 143%{_includedir}/rocksdb
578f0abc 144%{_pkgconfigdir}/rocksdb.pc
c4a98ad2 145
b427c498 146%if %{with static_libs}
c4a98ad2
JB
147%files static
148%defattr(644,root,root,755)
149%{_libdir}/librocksdb.a
b427c498 150%endif
This page took 0.488883 seconds and 4 git commands to generate.