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