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