-
Notifications
You must be signed in to change notification settings - Fork 22
/
zlog.spec.in
112 lines (93 loc) · 2.47 KB
/
zlog.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Name: zlog
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: distributed shared log
License: Apache 2.0
Source0: @[email protected]
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: java-devel
BuildRequires: lcov
BuildRequires: libatomic
BuildRequires: lmdb-devel
# these packages happen to be in fedora, but not centos. we aren't building
# packages yet for centos, so not dealing with this yet.
%if 0%{?fedora}
BuildRequires: librados-devel
BuildRequires: rados-objclass-devel
%endif
%description
distributed shared log
%package -n libzlog
Summary: zlog client library
%description -n libzlog
zlog is a thing
%package -n libzlog-devel
Summary: zlog client headers
Requires: libzlog
Provides: libzlog-devel
%description -n libzlog-devel
contains zlog headers
%package -n zlog-ceph
Summary: zlog ceph support
Requires: libzlog
%description -n zlog-ceph
zlog ceph support
%package -n zlog-ceph-devel
Summary: zlog ceph devel headers
Requires: libzlog-devel
%description -n zlog-ceph-devel
zlog ceph devel headers
%package -n zlog-ceph-plugin
Summary: zlog ceph server plugin
%description -n zlog-ceph-plugin
zlog ceph server plugin
%prep
%autosetup -p1 -n @TARBALL_BASENAME@
%build
# unlimit _smp_mflags in system macro if not set above
%define _smp_ncpus_max 0
# extract the number of processors for use with cmake
%define _smp_ncpus %(echo %{_smp_mflags} | sed 's/-j//')
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DWITH_JNI=OFF \
..
make %{?_smp_mflags}
%install
cd build
make DESTDIR=%{buildroot} install
%clean
rm -rf %{buildroot}
%files -n libzlog
%{_bindir}/zlog
%{_bindir}/zlog_test_backend_ram
%{_bindir}/zlog_test_backend_lmdb
%{_libdir}/libzlog.so.*
%{_libdir}/libzlog_backend_ram.so.*
%{_libdir}/libzlog_backend_lmdb.so.*
%files -n libzlog-devel
%dir %{_includedir}/zlog
%{_includedir}/zlog/capi.h
%{_includedir}/zlog/log.h
%{_includedir}/zlog/options.h
%{_includedir}/zlog/backend.h
%{_includedir}/zlog/backend/ram.h
%{_includedir}/zlog/backend/lmdb.h
%{_libdir}/libzlog.so
%{_libdir}/libzlog_backend_ram.so
%{_libdir}/libzlog_backend_lmdb.so
%files -n zlog-ceph
%{_bindir}/zlog_test_backend_ceph
%{_bindir}/zlog_test_cls_zlog
%{_libdir}/libzlog_backend_ceph.so.*
%files -n zlog-ceph-devel
%{_includedir}/zlog/backend/ceph.h
%{_libdir}/libzlog_backend_ceph.so
%files -n zlog-ceph-plugin
%{_libdir}/rados-classes/libcls_zlog.so*