-
Notifications
You must be signed in to change notification settings - Fork 1
/
libm0common.spec-in.meson
176 lines (139 loc) · 5.75 KB
/
libm0common.spec-in.meson
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
%define sourcename @CPACK_SOURCE_PACKAGE_FILE_NAME@
%global dev_version %{lua: extraver = string.gsub('@LIBM0COMMON_EXTRA_VERSION@', '%-', '.'); print(extraver) }
Name: libkvsns
Version: @LIBM0COMMON_BASE_VERSION@
Release: 0%{dev_version}%{?dist}
Summary: Library to access to a namespace inside a KVS
License: LGPLv3
Group: Development/Libraries
Url: http://github.com/phdeniel/libkvsns
Source: %{sourcename}.tar.xz
BuildRequires: hiredis-devel libini_config-devel
BuildRequires: gcc
BuildRequires: meson ninja-build
Requires: redis hiredis libini_config
Provides: %{name} = %{version}-%{release}
# Remove implicit dep to libkvsns (which prevent from building libkvsns-utils
%global __requires_exclude ^libkvsns\\.so.*$
# Conditionally enable KVS and object stores
#
# 1. rpmbuild accepts these options (gpfs as example):
# --without redis
%define on_off_switch() %%{?with_%1:ON}%%{!?with_%1:OFF}
# A few explanation about %bcond_with and %bcond_without
# /!\ be careful: this syntax can be quite messy
# %bcond_with means you add a "--with" option, default = without this feature
# %bcond_without adds a"--without" so the feature is enabled by default
@BCOND_RADOS@ rados
%global use_rados %{on_off_switch rados}
%description
The libkvsns is a library that allows of a POSIX namespace built on top of
a Key-Value Store.
%package devel
Summary: Development file for the library libkvsns
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} pkgconfig
Requires: hiredis-devel
Provides: %{name}-devel = %{version}-%{release}
%description devel
The libkvsns is a library that allows of a POSIX namespace built on top of
a Key-Value Store.
This package contains tools for libkvsns.
%package utils
Summary: Development file for the library libkvsns
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} pkgconfig
Requires: redis hiredis libkvsns
Provides: %{name}-utils = %{version}-%{release}
%description utils
The libkvsns is a library that allows of a POSIX namespace built on top of
a Key-Value Store.
This package contains the tools for libkvsns.
%prep
%setup -q -n %{sourcename}
%build
meson %{_builddir}
ninja -C %{_builddir}
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_includedir}/kvsns
mkdir -p %{buildroot}%{_sysconfdir}/iosea.d
install -m 644 include/kvsns/kvsns.h %{buildroot}%{_includedir}/kvsns
install -m 644 include/kvsns/kvsal.h %{buildroot}%{_includedir}/kvsns
install -m 644 include/kvsns/extstore.h %{buildroot}%{_includedir}/kvsns
install -m 644 %{_builddir}/kvsal/redis/libkvsal_redis.so %{buildroot}%{_libdir}
install -m 644 %{_builddir}/extstore/posix_store/libextstore_posix.so %{buildroot}%{_libdir}
install -m 644 %{_builddir}/extstore/crud_cache/libextstore_crud_cache.so %{buildroot}%{_libdir}
install -m 644 %{_builddir}/extstore/crud_cache/libobjstore_cmd.so %{buildroot}%{_libdir}
%if %{with rados gnutls}
install -m 644 %{_builddir}/extstore/rados/libextstore_rados.so %{buildroot}%{_libdir}
%endif
install -m 644 %{_builddir}/kvsns/libkvsns.so %{buildroot}%{_libdir}
install -m 644 libkvsns.pc %{buildroot}%{_libdir}/pkgconfig
install -m 755 %{_builddir}/kvsns_shell/kvsns_busybox %{buildroot}%{_bindir}
install -m 755 %{_builddir}/kvsns_shell/kvsns_cp %{buildroot}%{_bindir}
install -m 755 %{_builddir}/kvsns_hsm/kvsns_hsm %{buildroot}%{_bindir}
install -m 755 scripts/cp_put.sh %{buildroot}%{_bindir}
install -m 755 scripts/cp_get.sh %{buildroot}%{_bindir}
install -m 755 %{_builddir}/kvsns_attach/kvsns_attach %{buildroot}%{_bindir}
install -m 644 kvsns.ini %{buildroot}%{_sysconfdir}/iosea.d
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_libdir}/libkvsal_redis.so*
%{_libdir}/libextstore_posix.so*
%{_libdir}/libextstore_crud_cache.so*
%{_libdir}/libobjstore_cmd.so*
%if %{with rados gnutls}
%{_libdir}/libextstore_rados.so*
%endif
%{_libdir}/libkvsns.so*
%config(noreplace) %{_sysconfdir}/iosea.d/kvsns.ini
%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/libkvsns.pc
%{_includedir}/kvsns/kvsns.h
%{_includedir}/kvsns/kvsal.h
%{_includedir}/kvsns/extstore.h
%files utils
%defattr(-,root,root)
%{_bindir}/kvsns_busybox
%{_bindir}/kvsns_cp
%{_bindir}/kvsns_hsm
%{_bindir}/kvsns_attach
%{_bindir}/cp_put.sh
%{_bindir}/cp_get.sh
%changelog
* Wed Nov 3 2021 Philippe DENIEL <[email protected]> 1.3.0
- Better layering between kvsns, kvsal aand extstore.
* Mon Aug 3 2020 Philippe DENIEL <[email protected]> 1.2.8
- Change dependencies so that libkvsns-utils can be built
* Wed Jun 24 2020 Philippe DENIEL <[email protected]> 1.2.7
- Use dlopen and dlsym to manage kvsal
* Wed Jun 24 2020 Philippe DENIEL <[email protected]> 1.2.6
- Use dlopen and dlsym to manage extstore
* Tue Jun 23 2020 Philippe DENIEL <[email protected]> 1.2.5
- More modularity in crud_cache
* Tue Jun 16 2020 Philippe DENIEL <[email protected]> 1.2.4
- Add crud_cache feature for object stores that support only put/get/delete
* Tue Oct 24 2017 Philippe DENIEL <[email protected]> 1.2.3
- Support RADOS as an object store
* Tue Jun 27 2017 Philippe DENIEL <[email protected]> 1.2.2
- Modification of internal API
* Tue Jun 20 2017 Philippe DENIEL <[email protected]> 1.2.1
- Some bug fixed
* Tue Jun 13 2017 Philippe DENIEL <[email protected]> 1.2.0
- Add support for config file via libini_config
* Fri Jun 2 2017 Philippe DENIEL <[email protected]> 1.1.3
- Add kvsns_cp
* Fri Jun 2 2017 Philippe DENIEL <[email protected]> 1.1.2
- Add kvsns_attach feature
* Wed Nov 16 2016 Philippe DENIEL <[email protected]> 1.0.1
- Release candidate
* Mon Aug 1 2016 Philippe DENIEL <[email protected]> 0.9.2
- Source code tree refurbished
* Mon Jul 25 2016 Philippe DENIEL <[email protected]> 0.9.1
- First alpha version