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