]> git.pld-linux.org Git - packages/libblockdev.git/blob - libblockdev.spec
- plugins: R += -nvidmm, -vdo subpackages
[packages/libblockdev.git] / libblockdev.spec
1 # Conditional build:
2 %bcond_without  apidocs         # do not build and package API docs
3 #
4 Summary:        A library for low-level manipulation with block devices
5 Name:           libblockdev
6 Version:        2.20
7 Release:        1
8 License:        LGPL v2+
9 Group:          Libraries
10 Source0:        https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz
11 # Source0-md5:  d745bd792e07e00f3d579514167d0fed
12 URL:            https://github.com/storaged-project/libblockdev
13 BuildRequires:  autoconf
14 BuildRequires:  automake
15 BuildRequires:  cryptsetup-devel >= 1.6.7
16 BuildRequires:  device-mapper-devel >= 1.02.93
17 BuildRequires:  dmraid-devel
18 BuildRequires:  glib2-devel >= 1:2.42.2
19 BuildRequires:  gobject-introspection-devel >= 1.3.0
20 BuildRequires:  gtk-doc
21 BuildRequires:  kmod-devel >= 19
22 BuildRequires:  libblkid-devel >= 2.23.0
23 BuildRequires:  libbytesize-devel >= 0.1
24 BuildRequires:  libmount-devel >= 2.23.0
25 BuildRequires:  libtool
26 BuildRequires:  nss-devel >= 3.18.0
27 BuildRequires:  parted-devel >= 3.1
28 BuildRequires:  pkgconfig
29 BuildRequires:  python-devel
30 BuildRequires:  python3-devel
31 BuildRequires:  udev-devel >= 216
32 BuildRequires:  volume_key-devel
33 Requires:       glib2 >= 1:2.42.2
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 The libblockdev is a C library with GObject introspection support that
38 can be used for doing low-level operations with block devices like
39 setting up LVM, BTRFS, LUKS or MD RAID. The library uses plugins (LVM,
40 BTRFS,...) and serves as a thin wrapper around its plugins'
41 functionality. All the plugins, however, can be used as standalone
42 libraries. One of the core principles of libblockdev is that it is
43 stateless from the storage configuration's perspective (e.g. it has no
44 information about VGs when creating an LV).
45
46 %package devel
47 Summary:        Header files for libblockdev library
48 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libblockdec
49 Group:          Development/Libraries
50 Requires:       %{name} = %{version}-%{release}
51 Requires:       %{name}-btrfs = %{version}-%{release}
52 Requires:       %{name}-crypto = %{version}-%{release}
53 Requires:       %{name}-dm = %{version}-%{release}
54 Requires:       %{name}-fs = %{version}-%{release}
55 Requires:       %{name}-kbd = %{version}-%{release}
56 Requires:       %{name}-loop = %{version}-%{release}
57 Requires:       %{name}-lvm = %{version}-%{release}
58 Requires:       %{name}-lvm-dbus = %{version}-%{release}
59 Requires:       %{name}-mdraid = %{version}-%{release}
60 Requires:       %{name}-mpath = %{version}-%{release}
61 Requires:       %{name}-part = %{version}-%{release}
62 Requires:       %{name}-swap = %{version}-%{release}
63 Requires:       glib2-devel >= 1:2.42.2
64
65 %description devel
66 Header files for libblockdev library.
67
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki libblockdev.
70
71 %package apidocs
72 Summary:        libblockdev API documentation
73 Summary(pl.UTF-8):      Dokumentacja API biblioteki libblockdev
74 Group:          Documentation
75 Requires:       gtk-doc-common
76
77 %description apidocs
78 API documentation for libblockdev library.
79
80 %description apidocs -l pl.UTF-8
81 Dokumentacja API biblioteki libblockdev.
82
83 %package btrfs
84 Summary:        The BTRFS plugin for the libblockdev library
85 Group:          Libraries
86 Requires:       %{name} = %{version}-%{release}
87 Requires:       btrfs-progs
88
89 %description btrfs
90 The libblockdev library plugin providing the BTRFS-related
91 functionality.
92
93 %package crypto
94 Summary:        The crypto plugin for the libblockdev library
95 Group:          Libraries
96 Requires:       %{name} = %{version}-%{release}
97
98 %description crypto
99 The libblockdev library plugin providing the functionality related to
100 encrypted devices (LUKS).
101
102 %package dm
103 Summary:        The Device Mapper plugin for the libblockdev library
104 Group:          Libraries
105 Requires:       %{name} = %{version}-%{release}
106 Requires:       device-mapper
107 Requires:       dmraid
108
109 %description dm
110 The libblockdev library plugin providing the functionality related to
111 Device Mapper.
112
113 %package fs
114 Summary:        The FS plugin for the libblockdev library
115 Group:          Libraries
116 Requires:       %{name} = %{version}-%{release}
117
118 %description fs
119 The libblockdev library plugin providing the functionality related to
120 operations with file systems.
121
122 %package kbd
123 Summary:        The KBD plugin for the libblockdev library
124 Group:          Libraries
125 Requires:       %{name} = %{version}-%{release}
126 Requires:       bcache-tools >= 1.0.8
127
128 %description kbd
129 The libblockdev library plugin providing the functionality related to
130 kernel block devices (namely zRAM and Bcache).
131
132 %package loop
133 Summary:        The loop plugin for the libblockdev library
134 Group:          Libraries
135 Requires:       %{name} = %{version}-%{release}
136
137 %description loop
138 The libblockdev library plugin providing the functionality related to
139 loop devices.
140
141 %package lvm
142 Summary:        The LVM plugin for the libblockdev library
143 Group:          Libraries
144 Requires:       %{name} = %{version}-%{release}
145 Requires:       lvm2
146 Requires:       thin-provisioning-tools
147
148 %description lvm
149 The libblockdev library plugin providing the LVM-related
150 functionality.
151
152 %package lvm-dbus
153 Summary:        The LVM plugin for the libblockdev library
154 Group:          Libraries
155 Requires:       %{name} = %{version}-%{release}
156 Requires:       lvm2-dbusd >= 2.02.156
157 Requires:       thin-provisioning-tools
158
159 %description lvm-dbus
160 The libblockdev library plugin providing the LVM-related functionality
161 utilizing the LVM DBus API.
162
163 %package mdraid
164 Summary:        The MD RAID plugin for the libblockdev library
165 Group:          Libraries
166 Requires:       %{name} = %{version}-%{release}
167 Requires:       mdadm
168
169 %description mdraid
170 The libblockdev library plugin providing the functionality related to
171 MD RAID.
172
173 %package mpath
174 Summary:        The multipath plugin for the libblockdev library
175 Group:          Libraries
176 Requires:       %{name} = %{version}-%{release}
177 Requires:       multipath-tools
178
179 %description mpath
180 The libblockdev library plugin providing the functionality related to
181 multipath devices.
182
183 %package nvdimm
184 Summary:        The nvdimm plugin for the libblockdev library
185 Group:          Libraries
186 Requires:       %{name} = %{version}-%{release}
187
188 %description nvdimm
189 The libblockdev library plugin providing the functionality related to
190 nvdimm devices.
191
192 %package part
193 Summary:        The partitioning plugin for the libblockdev library
194 Group:          Libraries
195 Requires:       %{name} = %{version}-%{release}
196 Requires:       gdisk
197 Requires:       multipath-tools
198 Requires:       util-linux
199
200 %description part
201 The libblockdev library plugin providing the functionality related to
202 partitioning.
203
204 %package swap
205 Summary:        The swap plugin for the libblockdev library
206 Group:          Libraries
207 Requires:       %{name} = %{version}-%{release}
208 Requires:       util-linux
209
210 %description swap
211 The libblockdev library plugin providing the functionality related to
212 swap devices.
213
214 %package vdo
215 Summary:        The vdo plugin for the libblockdev library
216 Group:          Libraries
217 Requires:       %{name} = %{version}-%{release}
218
219 %description vdo
220 The libblockdev library plugin providing the functionality related to
221 vdo devices.
222
223 %package plugins
224 Summary:        Meta-package that pulls all the libblockdev plugins as dependencies
225 Group:          Libraries
226 Requires:       %{name}-btrfs = %{version}-%{release}
227 Requires:       %{name}-crypto = %{version}-%{release}
228 Requires:       %{name}-dm = %{version}-%{release}
229 Requires:       %{name}-fs = %{version}-%{release}
230 Requires:       %{name}-kbd = %{version}-%{release}
231 Requires:       %{name}-loop = %{version}-%{release}
232 Requires:       %{name}-lvm = %{version}-%{release}
233 Requires:       %{name}-lvm-dbus = %{version}-%{release}
234 Requires:       %{name}-mdraid = %{version}-%{release}
235 Requires:       %{name}-mpath = %{version}-%{release}
236 Requires:       %{name}-nvdimm = %{version}-%{release}
237 Requires:       %{name}-part = %{version}-%{release}
238 Requires:       %{name}-swap = %{version}-%{release}
239 Requires:       %{name}-vdo = %{version}-%{release}
240
241 %description plugins
242 A meta-package that pulls all the libblockdev plugins as dependencies.
243
244 %package -n python-blockdev
245 Summary:        Python bindings for libblockdev
246 Group:          Libraries/Python
247 Requires:       %{name} = %{version}-%{release}
248 Requires:       python-pygobject3
249
250 %description -n python-blockdev
251 This package contains Python bindings for libblockdev.
252
253 %package -n python3-blockdev
254 Summary:        Python 3 bindings for libblockdev
255 Group:          Libraries/Python
256 Requires:       %{name} = %{version}-%{release}
257 Requires:       python3-pygobject3
258
259 %description -n python3-blockdev
260 This package contains Python 3 bindings for libblockdev.
261
262 %prep
263 %setup -q
264
265 %build
266 %{__libtoolize}
267 %{__aclocal} -I m4
268 %{__autoconf}
269 %{__automake}
270 %configure \
271         %{__with_without apidocs gtk-doc}
272 %{__make}
273
274 %install
275 rm -rf $RPM_BUILD_ROOT
276 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
277
278 %{__make} install \
279         DESTDIR=$RPM_BUILD_ROOT
280
281 %if %{with apidocs}
282 %{__mv} -f $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libblockdev,%{_gtkdocdir}}
283 %endif
284
285 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
286
287 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
288 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
289 %py_postclean
290
291 %clean
292 rm -rf $RPM_BUILD_ROOT
293
294 %post   -p /sbin/ldconfig
295 %postun -p /sbin/ldconfig
296
297 %post btrfs -p /sbin/ldconfig
298 %postun btrfs -p /sbin/ldconfig
299
300 %post crypto -p /sbin/ldconfig
301 %postun crypto -p /sbin/ldconfig
302
303 %post dm -p /sbin/ldconfig
304 %postun dm -p /sbin/ldconfig
305
306 %post fs -p /sbin/ldconfig
307 %postun fs -p /sbin/ldconfig
308
309 %post kbd -p /sbin/ldconfig
310 %postun kbd -p /sbin/ldconfig
311
312 %post loop -p /sbin/ldconfig
313 %postun loop -p /sbin/ldconfig
314
315 %post lvm -p /sbin/ldconfig
316 %postun lvm -p /sbin/ldconfig
317
318 %post lvm-dbus -p /sbin/ldconfig
319 %postun lvm-dbus -p /sbin/ldconfig
320
321 %post mdraid -p /sbin/ldconfig
322 %postun mdraid -p /sbin/ldconfig
323
324 %post mpath -p /sbin/ldconfig
325 %postun mpath -p /sbin/ldconfig
326
327 %post nvdimm -p /sbin/ldconfig
328 %postun nvdimm -p /sbin/ldconfig
329
330 %post part -p /sbin/ldconfig
331 %postun part -p /sbin/ldconfig
332
333 %post swap -p /sbin/ldconfig
334 %postun swap -p /sbin/ldconfig
335
336 %post vdo -p /sbin/ldconfig
337 %postun vdo -p /sbin/ldconfig
338
339 %files
340 %defattr(644,root,root,755)
341 %doc features.rst specs.rst
342 %attr(755,root,root) %{_libdir}/libbd_part_err.so.*.*.*
343 %attr(755,root,root) %ghost %{_libdir}/libbd_part_err.so.2
344 %attr(755,root,root) %{_libdir}/libbd_utils.so.*.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libbd_utils.so.2
346 %attr(755,root,root) %{_libdir}/libblockdev.so.*.*.*
347 %attr(755,root,root) %ghost %{_libdir}/libblockdev.so.2
348 %dir %{_sysconfdir}/libblockdev
349 %dir %{_sysconfdir}/libblockdev/conf.d
350 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/00-default.cfg
351 %{_libdir}/girepository-1.0/BlockDev-2.0.typelib
352
353 %files devel
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/libbd_btrfs.so
356 %attr(755,root,root) %{_libdir}/libbd_crypto.so
357 %attr(755,root,root) %{_libdir}/libbd_dm.so
358 %attr(755,root,root) %{_libdir}/libbd_fs.so
359 %attr(755,root,root) %{_libdir}/libbd_kbd.so
360 %attr(755,root,root) %{_libdir}/libbd_loop.so
361 %attr(755,root,root) %{_libdir}/libbd_lvm.so
362 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so
363 %attr(755,root,root) %{_libdir}/libbd_mdraid.so
364 %attr(755,root,root) %{_libdir}/libbd_mpath.so
365 %attr(755,root,root) %{_libdir}/libbd_nvdimm.so
366 %attr(755,root,root) %{_libdir}/libbd_part.so
367 %attr(755,root,root) %{_libdir}/libbd_part_err.so
368 %attr(755,root,root) %{_libdir}/libbd_swap.so
369 %attr(755,root,root) %{_libdir}/libbd_utils.so
370 %attr(755,root,root) %{_libdir}/libbd_vdo.so
371 %attr(755,root,root) %{_libdir}/libblockdev.so
372 %{_includedir}/blockdev
373 %{_datadir}/gir-1.0/BlockDev-2.0.gir
374 %{_pkgconfigdir}/blockdev.pc
375 %{_pkgconfigdir}/blockdev-utils.pc
376
377 %if %{with apidocs}
378 %files apidocs
379 %defattr(644,root,root,755)
380 %{_gtkdocdir}/libblockdev
381 %endif
382
383 %files btrfs
384 %defattr(644,root,root,755)
385 %attr(755,root,root) %{_libdir}/libbd_btrfs.so.*.*.*
386 %attr(755,root,root) %ghost %{_libdir}/libbd_btrfs.so.2
387
388 %files crypto
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_libdir}/libbd_crypto.so.*.*.*
391 %attr(755,root,root) %ghost %{_libdir}/libbd_crypto.so.2
392
393 %files dm
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_libdir}/libbd_dm.so.*.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libbd_dm.so.2
397
398 %files fs
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libbd_fs.so.*.*.*
401 %attr(755,root,root) %ghost %{_libdir}/libbd_fs.so.2
402
403 %files kbd
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/libbd_kbd.so.*.*.*
406 %attr(755,root,root) %ghost %{_libdir}/libbd_kbd.so.2
407
408 %files loop
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/libbd_loop.so.*.*.*
411 %attr(755,root,root) %ghost %{_libdir}/libbd_loop.so.2
412
413 %files lvm
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/libbd_lvm.so.*.*.*
416 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm.so.2
417
418 %files lvm-dbus
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so.*.*.*
421 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm-dbus.so.2
422 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
423
424 %files mdraid
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/libbd_mdraid.so.*.*.*
427 %attr(755,root,root) %ghost %{_libdir}/libbd_mdraid.so.2
428
429 %files mpath
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/libbd_mpath.so.*.*.*
432 %attr(755,root,root) %ghost %{_libdir}/libbd_mpath.so.2
433
434 %files nvdimm
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_libdir}/libbd_nvdimm.so.*.*.*
437 %attr(755,root,root) %ghost %{_libdir}/libbd_nvdimm.so.2
438
439 %files part
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/libbd_part.so.*.*.*
442 %attr(755,root,root) %ghost %{_libdir}/libbd_part.so.2
443
444 %files swap
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/libbd_swap.so.*.*.*
447 %attr(755,root,root) %ghost %{_libdir}/libbd_swap.so.2
448
449 %files vdo
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/libbd_vdo.so.*.*.*
452 %attr(755,root,root) %ghost %{_libdir}/libbd_vdo.so.2
453
454 %files plugins
455 %defattr(644,root,root,755)
456
457 %files -n python-blockdev
458 %defattr(644,root,root,755)
459 %{py_sitedir}/gi/overrides/BlockDev.py[co]
460
461 %files -n python3-blockdev
462 %defattr(644,root,root,755)
463 %{py3_sitedir}/gi/overrides/BlockDev.py
This page took 0.080598 seconds and 4 git commands to generate.