]> git.pld-linux.org Git - packages/libblockdev.git/blame - libblockdev.spec
Initial release
[packages/libblockdev.git] / libblockdev.spec
CommitLineData
6602659b
MB
1# Conditional build:
2%bcond_without apidocs # do not build and package API docs
3#
4Summary: A library for low-level manipulation with block devices
5Name: libblockdev
6Version: 2.15
7Release: 1
8License: LGPL v2+
9Group: Libraries
10Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz
11# Source0-md5: 974bc075e696d54b0a6d2905231185d1
12URL: https://github.com/storaged-project/libblockdev
13BuildRequires: autoconf
14BuildRequires: automake
15BuildRequires: cryptsetup-devel >= 1.6.7
16BuildRequires: device-mapper-devel >= 1.02.93
17BuildRequires: dmraid-devel
18BuildRequires: glib2-devel >= 1:2.42.2
19BuildRequires: gobject-introspection-devel >= 1.3.0
20BuildRequires: gtk-doc
21BuildRequires: kmod-devel >= 19
22BuildRequires: libblkid-devel >= 2.23.0
23BuildRequires: libbytesize-devel >= 0.1
24BuildRequires: libmount-devel >= 2.23.0
25BuildRequires: libtool
26BuildRequires: nss-devel >= 3.18.0
27BuildRequires: parted-devel >= 3.1
28BuildRequires: pkgconfig
29BuildRequires: python-devel
30BuildRequires: python3-devel
31BuildRequires: udev-devel >= 216
32BuildRequires: volume_key-devel
33Requires: glib2 >= 1:2.42.2
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37The libblockdev is a C library with GObject introspection support that
38can be used for doing low-level operations with block devices like
39setting up LVM, BTRFS, LUKS or MD RAID. The library uses plugins (LVM,
40BTRFS,...) and serves as a thin wrapper around its plugins'
41functionality. All the plugins, however, can be used as standalone
42libraries. One of the core principles of libblockdev is that it is
43stateless from the storage configuration's perspective (e.g. it has no
44information about VGs when creating an LV).
45
46%package devel
47Summary: Header files for libblockdev library
48Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libblockdec
49Group: Development/Libraries
50Requires: %{name} = %{version}-%{release}
51Requires: %{name}-btrfs = %{version}-%{release}
52Requires: %{name}-crypto = %{version}-%{release}
53Requires: %{name}-dm = %{version}-%{release}
54Requires: %{name}-fs = %{version}-%{release}
55Requires: %{name}-kbd = %{version}-%{release}
56Requires: %{name}-loop = %{version}-%{release}
57Requires: %{name}-lvm = %{version}-%{release}
58Requires: %{name}-lvm-dbus = %{version}-%{release}
59Requires: %{name}-mdraid = %{version}-%{release}
60Requires: %{name}-mpath = %{version}-%{release}
61Requires: %{name}-part = %{version}-%{release}
62Requires: %{name}-swap = %{version}-%{release}
63Requires: glib2-devel >= 1:2.42.2
64
65%description devel
66Header files for libblockdev library.
67
68%description devel -l pl.UTF-8
69Pliki nagłówkowe biblioteki libblockdev.
70
71%package apidocs
72Summary: libblockdev API documentation
73Summary(pl.UTF-8): Dokumentacja API biblioteki libblockdev
74Group: Documentation
75Requires: gtk-doc-common
76
77%description apidocs
78API documentation for libblockdev library.
79
80%description apidocs -l pl.UTF-8
81Dokumentacja API biblioteki libblockdev.
82
83%package btrfs
84Summary: The BTRFS plugin for the libblockdev library
85Group: Libraries
86Requires: %{name} = %{version}-%{release}
87Requires: btrfs-progs
88
89%description btrfs
90The libblockdev library plugin providing the BTRFS-related
91functionality.
92
93%package crypto
94Summary: The crypto plugin for the libblockdev library
95Group: Libraries
96Requires: %{name} = %{version}-%{release}
97
98%description crypto
99The libblockdev library plugin providing the functionality related to
100encrypted devices (LUKS).
101
102%package dm
103Summary: The Device Mapper plugin for the libblockdev library
104Group: Libraries
105Requires: %{name} = %{version}-%{release}
106Requires: device-mapper
107Requires: dmraid
108
109%description dm
110The libblockdev library plugin providing the functionality related to
111Device Mapper.
112
113%package fs
114Summary: The FS plugin for the libblockdev library
115Group: Libraries
116Requires: %{name} = %{version}-%{release}
117
118%description fs
119The libblockdev library plugin providing the functionality related to
120operations with file systems.
121
122%package kbd
123Summary: The KBD plugin for the libblockdev library
124Group: Libraries
125Requires: %{name} = %{version}-%{release}
126Requires: bcache-tools >= 1.0.8
127
128%description kbd
129The libblockdev library plugin providing the functionality related to
130kernel block devices (namely zRAM and Bcache).
131
132%package loop
133Summary: The loop plugin for the libblockdev library
134Group: Libraries
135Requires: %{name} = %{version}-%{release}
136
137%description loop
138The libblockdev library plugin providing the functionality related to
139loop devices.
140
141%package lvm
142Summary: The LVM plugin for the libblockdev library
143Group: Libraries
144Requires: %{name} = %{version}-%{release}
145Requires: lvm2
146Requires: thin-provisioning-tools
147
148%description lvm
149The libblockdev library plugin providing the LVM-related
150functionality.
151
152%package lvm-dbus
153Summary: The LVM plugin for the libblockdev library
154Group: Libraries
155Requires: %{name} = %{version}-%{release}
156Requires: lvm2-dbusd >= 2.02.156
157Requires: thin-provisioning-tools
158
159%description lvm-dbus
160The libblockdev library plugin providing the LVM-related functionality
161utilizing the LVM DBus API.
162
163%package mdraid
164Summary: The MD RAID plugin for the libblockdev library
165Group: Libraries
166Requires: %{name} = %{version}-%{release}
167Requires: mdadm
168
169%description mdraid
170The libblockdev library plugin providing the functionality related to
171MD RAID.
172
173%package mpath
174Summary: The multipath plugin for the libblockdev library
175Group: Libraries
176Requires: %{name} = %{version}-%{release}
177Requires: multipath-tools
178
179%description mpath
180The libblockdev library plugin providing the functionality related to
181multipath devices.
182
183%package part
184Summary: The partitioning plugin for the libblockdev library
185Group: Libraries
186Requires: %{name} = %{version}-%{release}
187Requires: gdisk
188Requires: multipath-tools
189Requires: util-linux
190
191%description part
192The libblockdev library plugin providing the functionality related to
193partitioning.
194
195%package swap
196Summary: The swap plugin for the libblockdev library
197Group: Libraries
198Requires: %{name} = %{version}-%{release}
199Requires: util-linux
200
201%description swap
202The libblockdev library plugin providing the functionality related to
203swap devices.
204
205%package plugins
206Summary: Meta-package that pulls all the libblockdev plugins as dependencies
207Group: Libraries
208Requires: %{name}-btrfs = %{version}-%{release}
209Requires: %{name}-crypto = %{version}-%{release}
210Requires: %{name}-dm = %{version}-%{release}
211Requires: %{name}-fs = %{version}-%{release}
212Requires: %{name}-kbd = %{version}-%{release}
213Requires: %{name}-loop = %{version}-%{release}
214Requires: %{name}-lvm = %{version}-%{release}
215Requires: %{name}-lvm-dbus = %{version}-%{release}
216Requires: %{name}-mdraid = %{version}-%{release}
217Requires: %{name}-mpath = %{version}-%{release}
218Requires: %{name}-part = %{version}-%{release}
219Requires: %{name}-swap = %{version}-%{release}
220
221%description plugins
222A meta-package that pulls all the libblockdev plugins as dependencies.
223
224%package -n python-blockdev
225Summary: Python bindings for libblockdev
226Group: Libraries/Python
227Requires: %{name} = %{version}-%{release}
228Requires: python-pygobject3
229
230%description -n python-blockdev
231This package contains Python bindings for libblockdev.
232
233%package -n python3-blockdev
234Summary: Python 3 bindings for libblockdev
235Group: Libraries/Python
236Requires: %{name} = %{version}-%{release}
237Requires: python3-pygobject3
238
239%description -n python3-blockdev
240This 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
255rm -rf $RPM_BUILD_ROOT
256install -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
272rm -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.116292 seconds and 4 git commands to generate.