2 %bcond_without apidocs # do not build and package API docs
4 Summary: A library for low-level manipulation with block devices
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)
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).
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
66 Header files for libblockdev library.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki libblockdev.
72 Summary: libblockdev API documentation
73 Summary(pl.UTF-8): Dokumentacja API biblioteki libblockdev
75 Requires: gtk-doc-common
78 API documentation for libblockdev library.
80 %description apidocs -l pl.UTF-8
81 Dokumentacja API biblioteki libblockdev.
84 Summary: The BTRFS plugin for the libblockdev library
86 Requires: %{name} = %{version}-%{release}
90 The libblockdev library plugin providing the BTRFS-related
94 Summary: The crypto plugin for the libblockdev library
96 Requires: %{name} = %{version}-%{release}
99 The libblockdev library plugin providing the functionality related to
100 encrypted devices (LUKS).
103 Summary: The Device Mapper plugin for the libblockdev library
105 Requires: %{name} = %{version}-%{release}
106 Requires: device-mapper
110 The libblockdev library plugin providing the functionality related to
114 Summary: The FS plugin for the libblockdev library
116 Requires: %{name} = %{version}-%{release}
119 The libblockdev library plugin providing the functionality related to
120 operations with file systems.
123 Summary: The KBD plugin for the libblockdev library
125 Requires: %{name} = %{version}-%{release}
126 Requires: bcache-tools >= 1.0.8
129 The libblockdev library plugin providing the functionality related to
130 kernel block devices (namely zRAM and Bcache).
133 Summary: The loop plugin for the libblockdev library
135 Requires: %{name} = %{version}-%{release}
138 The libblockdev library plugin providing the functionality related to
142 Summary: The LVM plugin for the libblockdev library
144 Requires: %{name} = %{version}-%{release}
146 Requires: thin-provisioning-tools
149 The libblockdev library plugin providing the LVM-related
153 Summary: The LVM plugin for the libblockdev library
155 Requires: %{name} = %{version}-%{release}
156 Requires: lvm2-dbusd >= 2.02.156
157 Requires: thin-provisioning-tools
159 %description lvm-dbus
160 The libblockdev library plugin providing the LVM-related functionality
161 utilizing the LVM DBus API.
164 Summary: The MD RAID plugin for the libblockdev library
166 Requires: %{name} = %{version}-%{release}
170 The libblockdev library plugin providing the functionality related to
174 Summary: The multipath plugin for the libblockdev library
176 Requires: %{name} = %{version}-%{release}
177 Requires: multipath-tools
180 The libblockdev library plugin providing the functionality related to
184 Summary: The nvdimm plugin for the libblockdev library
186 Requires: %{name} = %{version}-%{release}
189 The libblockdev library plugin providing the functionality related to
193 Summary: The partitioning plugin for the libblockdev library
195 Requires: %{name} = %{version}-%{release}
197 Requires: multipath-tools
201 The libblockdev library plugin providing the functionality related to
205 Summary: The swap plugin for the libblockdev library
207 Requires: %{name} = %{version}-%{release}
211 The libblockdev library plugin providing the functionality related to
215 Summary: The vdo plugin for the libblockdev library
217 Requires: %{name} = %{version}-%{release}
220 The libblockdev library plugin providing the functionality related to
224 Summary: Meta-package that pulls all the libblockdev plugins as dependencies
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}
242 A meta-package that pulls all the libblockdev plugins as dependencies.
244 %package -n python-blockdev
245 Summary: Python bindings for libblockdev
246 Group: Libraries/Python
247 Requires: %{name} = %{version}-%{release}
248 Requires: python-pygobject3
250 %description -n python-blockdev
251 This package contains Python bindings for libblockdev.
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
259 %description -n python3-blockdev
260 This package contains Python 3 bindings for libblockdev.
271 %{__with_without apidocs gtk-doc}
275 rm -rf $RPM_BUILD_ROOT
276 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
279 DESTDIR=$RPM_BUILD_ROOT
282 %{__mv} -f $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libblockdev,%{_gtkdocdir}}
285 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
287 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
288 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
292 rm -rf $RPM_BUILD_ROOT
294 %post -p /sbin/ldconfig
295 %postun -p /sbin/ldconfig
297 %post btrfs -p /sbin/ldconfig
298 %postun btrfs -p /sbin/ldconfig
300 %post crypto -p /sbin/ldconfig
301 %postun crypto -p /sbin/ldconfig
303 %post dm -p /sbin/ldconfig
304 %postun dm -p /sbin/ldconfig
306 %post fs -p /sbin/ldconfig
307 %postun fs -p /sbin/ldconfig
309 %post kbd -p /sbin/ldconfig
310 %postun kbd -p /sbin/ldconfig
312 %post loop -p /sbin/ldconfig
313 %postun loop -p /sbin/ldconfig
315 %post lvm -p /sbin/ldconfig
316 %postun lvm -p /sbin/ldconfig
318 %post lvm-dbus -p /sbin/ldconfig
319 %postun lvm-dbus -p /sbin/ldconfig
321 %post mdraid -p /sbin/ldconfig
322 %postun mdraid -p /sbin/ldconfig
324 %post mpath -p /sbin/ldconfig
325 %postun mpath -p /sbin/ldconfig
327 %post nvdimm -p /sbin/ldconfig
328 %postun nvdimm -p /sbin/ldconfig
330 %post part -p /sbin/ldconfig
331 %postun part -p /sbin/ldconfig
333 %post swap -p /sbin/ldconfig
334 %postun swap -p /sbin/ldconfig
336 %post vdo -p /sbin/ldconfig
337 %postun vdo -p /sbin/ldconfig
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
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
379 %defattr(644,root,root,755)
380 %{_gtkdocdir}/libblockdev
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
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
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
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
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
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
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
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
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
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
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
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
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
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
455 %defattr(644,root,root,755)
457 %files -n python-blockdev
458 %defattr(644,root,root,755)
459 %{py_sitedir}/gi/overrides/BlockDev.py[co]
461 %files -n python3-blockdev
462 %defattr(644,root,root,755)
463 %{py3_sitedir}/gi/overrides/BlockDev.py