]> git.pld-linux.org Git - packages/libblockdev.git/blob - libblockdev.spec
- release 2 (by relup.sh)
[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:        2
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:  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)
36
37 %description
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).
46
47 %package devel
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
65
66 %description devel
67 Header files for libblockdev library.
68
69 %description devel -l pl.UTF-8
70 Pliki nagłówkowe biblioteki libblockdev.
71
72 %package apidocs
73 Summary:        libblockdev API documentation
74 Summary(pl.UTF-8):      Dokumentacja API biblioteki libblockdev
75 Group:          Documentation
76 Requires:       gtk-doc-common
77
78 %description apidocs
79 API documentation for libblockdev library.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API biblioteki libblockdev.
83
84 %package btrfs
85 Summary:        The BTRFS plugin for the libblockdev library
86 Group:          Libraries
87 Requires:       %{name} = %{version}-%{release}
88 Requires:       btrfs-progs
89
90 %description btrfs
91 The libblockdev library plugin providing the BTRFS-related
92 functionality.
93
94 %package crypto
95 Summary:        The crypto plugin for the libblockdev library
96 Group:          Libraries
97 Requires:       %{name} = %{version}-%{release}
98
99 %description crypto
100 The libblockdev library plugin providing the functionality related to
101 encrypted devices (LUKS).
102
103 %package dm
104 Summary:        The Device Mapper plugin for the libblockdev library
105 Group:          Libraries
106 Requires:       %{name} = %{version}-%{release}
107 Requires:       device-mapper
108 Requires:       dmraid
109
110 %description dm
111 The libblockdev library plugin providing the functionality related to
112 Device Mapper.
113
114 %package fs
115 Summary:        The FS plugin for the libblockdev library
116 Group:          Libraries
117 Requires:       %{name} = %{version}-%{release}
118
119 %description fs
120 The libblockdev library plugin providing the functionality related to
121 operations with file systems.
122
123 %package kbd
124 Summary:        The KBD plugin for the libblockdev library
125 Group:          Libraries
126 Requires:       %{name} = %{version}-%{release}
127 Requires:       bcache-tools >= 1.0.8
128
129 %description kbd
130 The libblockdev library plugin providing the functionality related to
131 kernel block devices (namely zRAM and Bcache).
132
133 %package loop
134 Summary:        The loop plugin for the libblockdev library
135 Group:          Libraries
136 Requires:       %{name} = %{version}-%{release}
137
138 %description loop
139 The libblockdev library plugin providing the functionality related to
140 loop devices.
141
142 %package lvm
143 Summary:        The LVM plugin for the libblockdev library
144 Group:          Libraries
145 Requires:       %{name} = %{version}-%{release}
146 Requires:       lvm2
147 Requires:       thin-provisioning-tools
148
149 %description lvm
150 The libblockdev library plugin providing the LVM-related
151 functionality.
152
153 %package lvm-dbus
154 Summary:        The LVM plugin for the libblockdev library
155 Group:          Libraries
156 Requires:       %{name} = %{version}-%{release}
157 Requires:       lvm2-dbusd >= 2.02.156
158 Requires:       thin-provisioning-tools
159
160 %description lvm-dbus
161 The libblockdev library plugin providing the LVM-related functionality
162 utilizing the LVM DBus API.
163
164 %package mdraid
165 Summary:        The MD RAID plugin for the libblockdev library
166 Group:          Libraries
167 Requires:       %{name} = %{version}-%{release}
168 Requires:       mdadm
169
170 %description mdraid
171 The libblockdev library plugin providing the functionality related to
172 MD RAID.
173
174 %package mpath
175 Summary:        The multipath plugin for the libblockdev library
176 Group:          Libraries
177 Requires:       %{name} = %{version}-%{release}
178 Requires:       multipath-tools
179
180 %description mpath
181 The libblockdev library plugin providing the functionality related to
182 multipath devices.
183
184 %package nvdimm
185 Summary:        The nvdimm plugin for the libblockdev library
186 Group:          Libraries
187 Requires:       %{name} = %{version}-%{release}
188
189 %description nvdimm
190 The libblockdev library plugin providing the functionality related to
191 nvdimm devices.
192
193 %package part
194 Summary:        The partitioning plugin for the libblockdev library
195 Group:          Libraries
196 Requires:       %{name} = %{version}-%{release}
197 Requires:       gdisk
198 Requires:       multipath-tools
199 Requires:       util-linux
200
201 %description part
202 The libblockdev library plugin providing the functionality related to
203 partitioning.
204
205 %package swap
206 Summary:        The swap plugin for the libblockdev library
207 Group:          Libraries
208 Requires:       %{name} = %{version}-%{release}
209 Requires:       util-linux
210
211 %description swap
212 The libblockdev library plugin providing the functionality related to
213 swap devices.
214
215 %package vdo
216 Summary:        The vdo plugin for the libblockdev library
217 Group:          Libraries
218 Requires:       %{name} = %{version}-%{release}
219
220 %description vdo
221 The libblockdev library plugin providing the functionality related to
222 vdo devices.
223
224 %package plugins
225 Summary:        Meta-package that pulls all the libblockdev plugins as dependencies
226 Group:          Libraries
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}
241
242 %description plugins
243 A meta-package that pulls all the libblockdev plugins as dependencies.
244
245 %package -n python-blockdev
246 Summary:        Python bindings for libblockdev
247 Group:          Libraries/Python
248 Requires:       %{name} = %{version}-%{release}
249 Requires:       python-pygobject3
250
251 %description -n python-blockdev
252 This package contains Python bindings for libblockdev.
253
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
259
260 %description -n python3-blockdev
261 This package contains Python 3 bindings for libblockdev.
262
263 %prep
264 %setup -q
265
266 %build
267 %{__libtoolize}
268 %{__aclocal} -I m4
269 %{__autoconf}
270 %{__automake}
271 %configure \
272         %{__with_without apidocs gtk-doc}
273 %{__make}
274
275 %install
276 rm -rf $RPM_BUILD_ROOT
277 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
278
279 %{__make} install \
280         DESTDIR=$RPM_BUILD_ROOT
281
282 %if %{with apidocs}
283 %{__mv} -f $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libblockdev,%{_gtkdocdir}}
284 %endif
285
286 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
287
288 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
289 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
290 %py_postclean
291
292 %clean
293 rm -rf $RPM_BUILD_ROOT
294
295 %post   -p /sbin/ldconfig
296 %postun -p /sbin/ldconfig
297
298 %post btrfs -p /sbin/ldconfig
299 %postun btrfs -p /sbin/ldconfig
300
301 %post crypto -p /sbin/ldconfig
302 %postun crypto -p /sbin/ldconfig
303
304 %post dm -p /sbin/ldconfig
305 %postun dm -p /sbin/ldconfig
306
307 %post fs -p /sbin/ldconfig
308 %postun fs -p /sbin/ldconfig
309
310 %post kbd -p /sbin/ldconfig
311 %postun kbd -p /sbin/ldconfig
312
313 %post loop -p /sbin/ldconfig
314 %postun loop -p /sbin/ldconfig
315
316 %post lvm -p /sbin/ldconfig
317 %postun lvm -p /sbin/ldconfig
318
319 %post lvm-dbus -p /sbin/ldconfig
320 %postun lvm-dbus -p /sbin/ldconfig
321
322 %post mdraid -p /sbin/ldconfig
323 %postun mdraid -p /sbin/ldconfig
324
325 %post mpath -p /sbin/ldconfig
326 %postun mpath -p /sbin/ldconfig
327
328 %post nvdimm -p /sbin/ldconfig
329 %postun nvdimm -p /sbin/ldconfig
330
331 %post part -p /sbin/ldconfig
332 %postun part -p /sbin/ldconfig
333
334 %post swap -p /sbin/ldconfig
335 %postun swap -p /sbin/ldconfig
336
337 %post vdo -p /sbin/ldconfig
338 %postun vdo -p /sbin/ldconfig
339
340 %files
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
353
354 %files devel
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
377
378 %if %{with apidocs}
379 %files apidocs
380 %defattr(644,root,root,755)
381 %{_gtkdocdir}/libblockdev
382 %endif
383
384 %files btrfs
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
388
389 %files crypto
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
393
394 %files dm
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
398
399 %files fs
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
403
404 %files kbd
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
408
409 %files loop
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
413
414 %files lvm
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
418
419 %files lvm-dbus
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
424
425 %files mdraid
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
429
430 %files mpath
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
434
435 %files nvdimm
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
439
440 %files part
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
444
445 %files swap
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
449
450 %files vdo
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
454
455 %files plugins
456 %defattr(644,root,root,755)
457
458 %files -n python-blockdev
459 %defattr(644,root,root,755)
460 %{py_sitedir}/gi/overrides/BlockDev.py[co]
461
462 %files -n python3-blockdev
463 %defattr(644,root,root,755)
464 %{py3_sitedir}/gi/overrides/BlockDev.py
This page took 0.071947 seconds and 4 git commands to generate.