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