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: ndctl-devel
27 BuildRequires: nss-devel >= 3.18.0
28 BuildRequires: parted-devel >= 3.1
29 BuildRequires: pkgconfig
30 BuildRequires: python-devel
31 BuildRequires: python3-devel
32 BuildRequires: udev-devel >= 216
33 BuildRequires: volume_key-devel
34 Requires: glib2 >= 1:2.42.2
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 The libblockdev is a C library with GObject introspection support that
39 can be used for doing low-level operations with block devices like
40 setting up LVM, BTRFS, LUKS or MD RAID. The library uses plugins (LVM,
41 BTRFS,...) and serves as a thin wrapper around its plugins'
42 functionality. All the plugins, however, can be used as standalone
43 libraries. One of the core principles of libblockdev is that it is
44 stateless from the storage configuration's perspective (e.g. it has no
45 information about VGs when creating an LV).
48 Summary: Header files for libblockdev library
49 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libblockdec
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
52 Requires: %{name}-btrfs = %{version}-%{release}
53 Requires: %{name}-crypto = %{version}-%{release}
54 Requires: %{name}-dm = %{version}-%{release}
55 Requires: %{name}-fs = %{version}-%{release}
56 Requires: %{name}-kbd = %{version}-%{release}
57 Requires: %{name}-loop = %{version}-%{release}
58 Requires: %{name}-lvm = %{version}-%{release}
59 Requires: %{name}-lvm-dbus = %{version}-%{release}
60 Requires: %{name}-mdraid = %{version}-%{release}
61 Requires: %{name}-mpath = %{version}-%{release}
62 Requires: %{name}-part = %{version}-%{release}
63 Requires: %{name}-swap = %{version}-%{release}
64 Requires: glib2-devel >= 1:2.42.2
67 Header files for libblockdev library.
69 %description devel -l pl.UTF-8
70 Pliki nagłówkowe biblioteki libblockdev.
73 Summary: libblockdev API documentation
74 Summary(pl.UTF-8): Dokumentacja API biblioteki libblockdev
76 Requires: gtk-doc-common
79 API documentation for libblockdev library.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API biblioteki libblockdev.
85 Summary: The BTRFS plugin for the libblockdev library
87 Requires: %{name} = %{version}-%{release}
91 The libblockdev library plugin providing the BTRFS-related
95 Summary: The crypto plugin for the libblockdev library
97 Requires: %{name} = %{version}-%{release}
100 The libblockdev library plugin providing the functionality related to
101 encrypted devices (LUKS).
104 Summary: The Device Mapper plugin for the libblockdev library
106 Requires: %{name} = %{version}-%{release}
107 Requires: device-mapper
111 The libblockdev library plugin providing the functionality related to
115 Summary: The FS plugin for the libblockdev library
117 Requires: %{name} = %{version}-%{release}
120 The libblockdev library plugin providing the functionality related to
121 operations with file systems.
124 Summary: The KBD plugin for the libblockdev library
126 Requires: %{name} = %{version}-%{release}
127 Requires: bcache-tools >= 1.0.8
130 The libblockdev library plugin providing the functionality related to
131 kernel block devices (namely zRAM and Bcache).
134 Summary: The loop plugin for the libblockdev library
136 Requires: %{name} = %{version}-%{release}
139 The libblockdev library plugin providing the functionality related to
143 Summary: The LVM plugin for the libblockdev library
145 Requires: %{name} = %{version}-%{release}
147 Requires: thin-provisioning-tools
150 The libblockdev library plugin providing the LVM-related
154 Summary: The LVM plugin for the libblockdev library
156 Requires: %{name} = %{version}-%{release}
157 Requires: lvm2-dbusd >= 2.02.156
158 Requires: thin-provisioning-tools
160 %description lvm-dbus
161 The libblockdev library plugin providing the LVM-related functionality
162 utilizing the LVM DBus API.
165 Summary: The MD RAID plugin for the libblockdev library
167 Requires: %{name} = %{version}-%{release}
171 The libblockdev library plugin providing the functionality related to
175 Summary: The multipath plugin for the libblockdev library
177 Requires: %{name} = %{version}-%{release}
178 Requires: multipath-tools
181 The libblockdev library plugin providing the functionality related to
185 Summary: The nvdimm plugin for the libblockdev library
187 Requires: %{name} = %{version}-%{release}
190 The libblockdev library plugin providing the functionality related to
194 Summary: The partitioning plugin for the libblockdev library
196 Requires: %{name} = %{version}-%{release}
198 Requires: multipath-tools
202 The libblockdev library plugin providing the functionality related to
206 Summary: The swap plugin for the libblockdev library
208 Requires: %{name} = %{version}-%{release}
212 The libblockdev library plugin providing the functionality related to
216 Summary: The vdo plugin for the libblockdev library
218 Requires: %{name} = %{version}-%{release}
221 The libblockdev library plugin providing the functionality related to
225 Summary: Meta-package that pulls all the libblockdev plugins as dependencies
227 Requires: %{name}-btrfs = %{version}-%{release}
228 Requires: %{name}-crypto = %{version}-%{release}
229 Requires: %{name}-dm = %{version}-%{release}
230 Requires: %{name}-fs = %{version}-%{release}
231 Requires: %{name}-kbd = %{version}-%{release}
232 Requires: %{name}-loop = %{version}-%{release}
233 Requires: %{name}-lvm = %{version}-%{release}
234 Requires: %{name}-lvm-dbus = %{version}-%{release}
235 Requires: %{name}-mdraid = %{version}-%{release}
236 Requires: %{name}-mpath = %{version}-%{release}
237 Requires: %{name}-nvdimm = %{version}-%{release}
238 Requires: %{name}-part = %{version}-%{release}
239 Requires: %{name}-swap = %{version}-%{release}
240 Requires: %{name}-vdo = %{version}-%{release}
243 A meta-package that pulls all the libblockdev plugins as dependencies.
245 %package -n python-blockdev
246 Summary: Python bindings for libblockdev
247 Group: Libraries/Python
248 Requires: %{name} = %{version}-%{release}
249 Requires: python-pygobject3
251 %description -n python-blockdev
252 This package contains Python bindings for libblockdev.
254 %package -n python3-blockdev
255 Summary: Python 3 bindings for libblockdev
256 Group: Libraries/Python
257 Requires: %{name} = %{version}-%{release}
258 Requires: python3-pygobject3
260 %description -n python3-blockdev
261 This package contains Python 3 bindings for libblockdev.
272 %{__with_without apidocs gtk-doc}
276 rm -rf $RPM_BUILD_ROOT
277 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
280 DESTDIR=$RPM_BUILD_ROOT
283 %{__mv} -f $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libblockdev,%{_gtkdocdir}}
286 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
288 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
289 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
293 rm -rf $RPM_BUILD_ROOT
295 %post -p /sbin/ldconfig
296 %postun -p /sbin/ldconfig
298 %post btrfs -p /sbin/ldconfig
299 %postun btrfs -p /sbin/ldconfig
301 %post crypto -p /sbin/ldconfig
302 %postun crypto -p /sbin/ldconfig
304 %post dm -p /sbin/ldconfig
305 %postun dm -p /sbin/ldconfig
307 %post fs -p /sbin/ldconfig
308 %postun fs -p /sbin/ldconfig
310 %post kbd -p /sbin/ldconfig
311 %postun kbd -p /sbin/ldconfig
313 %post loop -p /sbin/ldconfig
314 %postun loop -p /sbin/ldconfig
316 %post lvm -p /sbin/ldconfig
317 %postun lvm -p /sbin/ldconfig
319 %post lvm-dbus -p /sbin/ldconfig
320 %postun lvm-dbus -p /sbin/ldconfig
322 %post mdraid -p /sbin/ldconfig
323 %postun mdraid -p /sbin/ldconfig
325 %post mpath -p /sbin/ldconfig
326 %postun mpath -p /sbin/ldconfig
328 %post nvdimm -p /sbin/ldconfig
329 %postun nvdimm -p /sbin/ldconfig
331 %post part -p /sbin/ldconfig
332 %postun part -p /sbin/ldconfig
334 %post swap -p /sbin/ldconfig
335 %postun swap -p /sbin/ldconfig
337 %post vdo -p /sbin/ldconfig
338 %postun vdo -p /sbin/ldconfig
341 %defattr(644,root,root,755)
342 %doc features.rst specs.rst
343 %attr(755,root,root) %{_libdir}/libbd_part_err.so.*.*.*
344 %attr(755,root,root) %ghost %{_libdir}/libbd_part_err.so.2
345 %attr(755,root,root) %{_libdir}/libbd_utils.so.*.*.*
346 %attr(755,root,root) %ghost %{_libdir}/libbd_utils.so.2
347 %attr(755,root,root) %{_libdir}/libblockdev.so.*.*.*
348 %attr(755,root,root) %ghost %{_libdir}/libblockdev.so.2
349 %dir %{_sysconfdir}/libblockdev
350 %dir %{_sysconfdir}/libblockdev/conf.d
351 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/00-default.cfg
352 %{_libdir}/girepository-1.0/BlockDev-2.0.typelib
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_libdir}/libbd_btrfs.so
357 %attr(755,root,root) %{_libdir}/libbd_crypto.so
358 %attr(755,root,root) %{_libdir}/libbd_dm.so
359 %attr(755,root,root) %{_libdir}/libbd_fs.so
360 %attr(755,root,root) %{_libdir}/libbd_kbd.so
361 %attr(755,root,root) %{_libdir}/libbd_loop.so
362 %attr(755,root,root) %{_libdir}/libbd_lvm.so
363 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so
364 %attr(755,root,root) %{_libdir}/libbd_mdraid.so
365 %attr(755,root,root) %{_libdir}/libbd_mpath.so
366 %attr(755,root,root) %{_libdir}/libbd_nvdimm.so
367 %attr(755,root,root) %{_libdir}/libbd_part.so
368 %attr(755,root,root) %{_libdir}/libbd_part_err.so
369 %attr(755,root,root) %{_libdir}/libbd_swap.so
370 %attr(755,root,root) %{_libdir}/libbd_utils.so
371 %attr(755,root,root) %{_libdir}/libbd_vdo.so
372 %attr(755,root,root) %{_libdir}/libblockdev.so
373 %{_includedir}/blockdev
374 %{_datadir}/gir-1.0/BlockDev-2.0.gir
375 %{_pkgconfigdir}/blockdev.pc
376 %{_pkgconfigdir}/blockdev-utils.pc
380 %defattr(644,root,root,755)
381 %{_gtkdocdir}/libblockdev
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/libbd_btrfs.so.*.*.*
387 %attr(755,root,root) %ghost %{_libdir}/libbd_btrfs.so.2
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/libbd_crypto.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libbd_crypto.so.2
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libbd_dm.so.*.*.*
397 %attr(755,root,root) %ghost %{_libdir}/libbd_dm.so.2
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/libbd_fs.so.*.*.*
402 %attr(755,root,root) %ghost %{_libdir}/libbd_fs.so.2
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/libbd_kbd.so.*.*.*
407 %attr(755,root,root) %ghost %{_libdir}/libbd_kbd.so.2
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/libbd_loop.so.*.*.*
412 %attr(755,root,root) %ghost %{_libdir}/libbd_loop.so.2
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/libbd_lvm.so.*.*.*
417 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm.so.2
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so.*.*.*
422 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm-dbus.so.2
423 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/libbd_mdraid.so.*.*.*
428 %attr(755,root,root) %ghost %{_libdir}/libbd_mdraid.so.2
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/libbd_mpath.so.*.*.*
433 %attr(755,root,root) %ghost %{_libdir}/libbd_mpath.so.2
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/libbd_nvdimm.so.*.*.*
438 %attr(755,root,root) %ghost %{_libdir}/libbd_nvdimm.so.2
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/libbd_part.so.*.*.*
443 %attr(755,root,root) %ghost %{_libdir}/libbd_part.so.2
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/libbd_swap.so.*.*.*
448 %attr(755,root,root) %ghost %{_libdir}/libbd_swap.so.2
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_libdir}/libbd_vdo.so.*.*.*
453 %attr(755,root,root) %ghost %{_libdir}/libbd_vdo.so.2
456 %defattr(644,root,root,755)
458 %files -n python-blockdev
459 %defattr(644,root,root,755)
460 %{py_sitedir}/gi/overrides/BlockDev.py[co]
462 %files -n python3-blockdev
463 %defattr(644,root,root,755)
464 %{py3_sitedir}/gi/overrides/BlockDev.py