]> git.pld-linux.org Git - packages/libblockdev.git/blob - libblockdev.spec
Initial release
[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.15
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:  974bc075e696d54b0a6d2905231185d1
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 part
184 Summary:        The partitioning plugin for the libblockdev library
185 Group:          Libraries
186 Requires:       %{name} = %{version}-%{release}
187 Requires:       gdisk
188 Requires:       multipath-tools
189 Requires:       util-linux
190
191 %description part
192 The libblockdev library plugin providing the functionality related to
193 partitioning.
194
195 %package swap
196 Summary:        The swap plugin for the libblockdev library
197 Group:          Libraries
198 Requires:       %{name} = %{version}-%{release}
199 Requires:       util-linux
200
201 %description swap
202 The libblockdev library plugin providing the functionality related to
203 swap devices.
204
205 %package plugins
206 Summary:        Meta-package that pulls all the libblockdev plugins as dependencies
207 Group:          Libraries
208 Requires:       %{name}-btrfs = %{version}-%{release}
209 Requires:       %{name}-crypto = %{version}-%{release}
210 Requires:       %{name}-dm = %{version}-%{release}
211 Requires:       %{name}-fs = %{version}-%{release}
212 Requires:       %{name}-kbd = %{version}-%{release}
213 Requires:       %{name}-loop = %{version}-%{release}
214 Requires:       %{name}-lvm = %{version}-%{release}
215 Requires:       %{name}-lvm-dbus = %{version}-%{release}
216 Requires:       %{name}-mdraid = %{version}-%{release}
217 Requires:       %{name}-mpath = %{version}-%{release}
218 Requires:       %{name}-part = %{version}-%{release}
219 Requires:       %{name}-swap = %{version}-%{release}
220
221 %description plugins
222 A meta-package that pulls all the libblockdev plugins as dependencies.
223
224 %package -n python-blockdev
225 Summary:        Python bindings for libblockdev
226 Group:          Libraries/Python
227 Requires:       %{name} = %{version}-%{release}
228 Requires:       python-pygobject3
229
230 %description -n python-blockdev
231 This package contains Python bindings for libblockdev.
232
233 %package -n python3-blockdev
234 Summary:        Python 3 bindings for libblockdev
235 Group:          Libraries/Python
236 Requires:       %{name} = %{version}-%{release}
237 Requires:       python3-pygobject3
238
239 %description -n python3-blockdev
240 This package contains Python 3 bindings for libblockdev.
241
242 %prep
243 %setup -q
244
245 %build
246 %{__libtoolize}
247 %{__aclocal} -I m4
248 %{__autoconf}
249 %{__automake}
250 %configure \
251         %{__with_without apidocs gtk-doc}
252 %{__make}
253
254 %install
255 rm -rf $RPM_BUILD_ROOT
256 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
257
258 %{__make} install \
259         DESTDIR=$RPM_BUILD_ROOT
260
261 %if %{with apidocs}
262 %{__mv} -f $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libblockdev,%{_gtkdocdir}}
263 %endif
264
265 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
266
267 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
268 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
269 %py_postclean
270
271 %clean
272 rm -rf $RPM_BUILD_ROOT
273
274 %post   -p /sbin/ldconfig
275 %postun -p /sbin/ldconfig
276
277 %post btrfs -p /sbin/ldconfig
278 %postun btrfs -p /sbin/ldconfig
279
280 %post crypto -p /sbin/ldconfig
281 %postun crypto -p /sbin/ldconfig
282
283 %post dm -p /sbin/ldconfig
284 %postun dm -p /sbin/ldconfig
285
286 %post fs -p /sbin/ldconfig
287 %postun fs -p /sbin/ldconfig
288
289 %post kbd -p /sbin/ldconfig
290 %postun kbd -p /sbin/ldconfig
291
292 %post loop -p /sbin/ldconfig
293 %postun loop -p /sbin/ldconfig
294
295 %post lvm -p /sbin/ldconfig
296 %postun lvm -p /sbin/ldconfig
297
298 %post lvm-dbus -p /sbin/ldconfig
299 %postun lvm-dbus -p /sbin/ldconfig
300
301 %post mdraid -p /sbin/ldconfig
302 %postun mdraid -p /sbin/ldconfig
303
304 %post mpath -p /sbin/ldconfig
305 %postun mpath -p /sbin/ldconfig
306
307 %post part -p /sbin/ldconfig
308 %postun part -p /sbin/ldconfig
309
310 %post swap -p /sbin/ldconfig
311 %postun swap -p /sbin/ldconfig
312
313 %files
314 %defattr(644,root,root,755)
315 %doc features.rst specs.rst roadmap.rst
316 %attr(755,root,root) %{_libdir}/libbd_part_err.so.*.*.*
317 %attr(755,root,root) %ghost %{_libdir}/libbd_part_err.so.2
318 %attr(755,root,root) %{_libdir}/libbd_utils.so.*.*.*
319 %attr(755,root,root) %ghost %{_libdir}/libbd_utils.so.2
320 %attr(755,root,root) %{_libdir}/libblockdev.so.*.*.*
321 %attr(755,root,root) %ghost %{_libdir}/libblockdev.so.2
322 %dir %{_sysconfdir}/libblockdev
323 %dir %{_sysconfdir}/libblockdev/conf.d
324 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/00-default.cfg
325 %{_libdir}/girepository-1.0/BlockDev-2.0.typelib
326
327 %files devel
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/libbd_btrfs.so
330 %attr(755,root,root) %{_libdir}/libbd_crypto.so
331 %attr(755,root,root) %{_libdir}/libbd_dm.so
332 %attr(755,root,root) %{_libdir}/libbd_fs.so
333 %attr(755,root,root) %{_libdir}/libbd_kbd.so
334 %attr(755,root,root) %{_libdir}/libbd_loop.so
335 %attr(755,root,root) %{_libdir}/libbd_lvm.so
336 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so
337 %attr(755,root,root) %{_libdir}/libbd_mdraid.so
338 %attr(755,root,root) %{_libdir}/libbd_mpath.so
339 %attr(755,root,root) %{_libdir}/libbd_part.so
340 %attr(755,root,root) %{_libdir}/libbd_part_err.so
341 %attr(755,root,root) %{_libdir}/libbd_swap.so
342 %attr(755,root,root) %{_libdir}/libbd_utils.so
343 %attr(755,root,root) %{_libdir}/libblockdev.so
344 %{_includedir}/blockdev
345 %{_datadir}/gir-1.0/BlockDev-2.0.gir
346 %{_pkgconfigdir}/blockdev.pc
347 %{_pkgconfigdir}/blockdev-utils.pc
348
349 %if %{with apidocs}
350 %files apidocs
351 %defattr(644,root,root,755)
352 %{_gtkdocdir}/libblockdev
353 %endif
354
355 %files btrfs
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libbd_btrfs.so.*.*.*
358 %attr(755,root,root) %ghost %{_libdir}/libbd_btrfs.so.2
359
360 %files crypto
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/libbd_crypto.so.*.*.*
363 %attr(755,root,root) %ghost %{_libdir}/libbd_crypto.so.2
364
365 %files dm
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/libbd_dm.so.*.*.*
368 %attr(755,root,root) %ghost %{_libdir}/libbd_dm.so.2
369
370 %files fs
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_libdir}/libbd_fs.so.*.*.*
373 %attr(755,root,root) %ghost %{_libdir}/libbd_fs.so.2
374
375 %files kbd
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/libbd_kbd.so.*.*.*
378 %attr(755,root,root) %ghost %{_libdir}/libbd_kbd.so.2
379
380 %files loop
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_libdir}/libbd_loop.so.*.*.*
383 %attr(755,root,root) %ghost %{_libdir}/libbd_loop.so.2
384
385 %files lvm
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_libdir}/libbd_lvm.so.*.*.*
388 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm.so.2
389
390 %files lvm-dbus
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/libbd_lvm-dbus.so.*.*.*
393 %attr(755,root,root) %ghost %{_libdir}/libbd_lvm-dbus.so.2
394 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
395
396 %files mdraid
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/libbd_mdraid.so.*.*.*
399 %attr(755,root,root) %ghost %{_libdir}/libbd_mdraid.so.2
400
401 %files mpath
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libbd_mpath.so.*.*.*
404 %attr(755,root,root) %ghost %{_libdir}/libbd_mpath.so.2
405
406 %files part
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libbd_part.so.*.*.*
409 %attr(755,root,root) %ghost %{_libdir}/libbd_part.so.2
410
411 %files swap
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_libdir}/libbd_swap.so.*.*.*
414 %attr(755,root,root) %ghost %{_libdir}/libbd_swap.so.2
415
416 %files plugins
417 %defattr(644,root,root,755)
418
419 %files -n python-blockdev
420 %defattr(644,root,root,755)
421 %{py_sitedir}/gi/overrides/BlockDev.py[co]
422
423 %files -n python3-blockdev
424 %defattr(644,root,root,755)
425 %{py3_sitedir}/gi/overrides/BlockDev.py
This page took 0.126824 seconds and 3 git commands to generate.