]>
Commit | Line | Data |
---|---|---|
6d4283bb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python # Python bindings for libbtrfsutil | |
4 | %bcond_without tests # libbtrfsutil tests (requires python) | |
5 | ||
6 | %if %{without python} | |
7 | %undefine with_tests | |
8 | %endif | |
e3346250 | 9 | Summary: Utilities belonging to the btrfs filesystem |
bc661915 | 10 | Summary(pl.UTF-8): Narzędzia należące do systemu plików btrfs |
e3346250 | 11 | Name: btrfs-progs |
67059dfb | 12 | Version: 4.17.1 |
82ef4e43 | 13 | Release: 1 |
e3346250 AM |
14 | License: GPL v2 |
15 | Group: Applications/System | |
1fff9453 | 16 | Source0: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/%{name}-v%{version}.tar.xz |
67059dfb | 17 | # Source0-md5: 130be469ced99b01948af64b6a6312f6 |
7b8b71e8 | 18 | Patch0: %{name}-man.patch |
6d4283bb JB |
19 | Patch1: %{name}-sh.patch |
20 | Patch2: %{name}-python-async.patch | |
e3346250 | 21 | URL: http://btrfs.wiki.kernel.org/ |
7172bf1c | 22 | BuildRequires: acl-devel |
cae4ce1d | 23 | BuildRequires: asciidoc |
82ef4e43 | 24 | BuildRequires: autoconf >= 2.60 |
35aaeb32 | 25 | BuildRequires: e2fsprogs-devel >= 1.42.0 |
7172bf1c | 26 | BuildRequires: libblkid-devel |
82ef4e43 | 27 | BuildRequires: libcom_err-devel |
e3346250 | 28 | BuildRequires: libuuid-devel |
a11951f7 | 29 | BuildRequires: lzo-devel >= 2 |
35aaeb32 | 30 | BuildRequires: pkgconfig >= 0.9.0 |
6d4283bb JB |
31 | %{?with_python:BuildRequires: python3-devel >= 1:3.4} |
32 | BuildRequires: reiserfsprogs-devel >= 3.6.27 | |
7172bf1c | 33 | BuildRequires: tar >= 1:1.22 |
6d4283bb | 34 | BuildRequires: udev-devel >= 1:190 |
82ef4e43 | 35 | BuildRequires: xmlto |
7172bf1c | 36 | BuildRequires: xz |
1d46f4d5 | 37 | BuildRequires: zlib-devel |
6d4283bb JB |
38 | BuildRequires: zstd-devel >= 1.0.0 |
39 | Requires: e2fsprogs-libs >= 1.42.0 | |
40 | Requires: reiserfsprogs-libs >= 1:3.6.27 | |
41 | Requires: %{name}-libs = %{version}-%{release} | |
e3346250 AM |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %define _sbindir /sbin | |
45 | ||
46 | %description | |
47 | Btrfs is a new copy on write filesystem for Linux aimed at | |
48 | implementing advanced features while focusing on fault tolerance, | |
49 | repair and easy administration. | |
50 | ||
bc661915 JB |
51 | %description -l pl.UTF-8 |
52 | Btrfs to nowy system plików dla Linuksa oparty na zasadzie kopiowania | |
53 | przy zapisie (copy-on-write), którego celem jest zaimplementowanie | |
54 | zaawansowanych możliwości ze szczególnym naciskiem na odporność na | |
55 | awarie, naprawę i łatwe administrowanie. | |
56 | ||
6d4283bb JB |
57 | %package libs |
58 | Summary: Shared btrfs library | |
59 | Summary(pl.UTF-8): Biblioteka współdzielona btrfs | |
60 | Group: Libraries | |
61 | ||
62 | %description libs | |
63 | Shared btrfs library. | |
64 | ||
65 | %description libs -l pl.UTF-8 | |
66 | Biblioteka współdzielona btrfs. | |
67 | ||
7172bf1c | 68 | %package devel |
bc661915 JB |
69 | Summary: Header files for btrfs filesystem-specific library |
70 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dla systemu plików btrfs | |
7172bf1c | 71 | Group: Development/Libraries |
6d4283bb | 72 | Requires: %{name}-libs = %{version}-%{release} |
7172bf1c ER |
73 | |
74 | %description devel | |
bc661915 | 75 | This package contains the header files needed to develop btrfs |
7172bf1c ER |
76 | filesystem-specific programs. |
77 | ||
bc661915 JB |
78 | %description devel -l pl.UTF-8 |
79 | Ten pakiet zawiera pliki nagłówkowe potrzebne przy tworzeniu programów | |
80 | przeznaczonych dla systemu plików btrfs. | |
81 | ||
82 | %package static | |
83 | Summary: Static btrfs filesystem library | |
84 | Summary(pl.UTF-8): Statyczna biblioteka dla systemu plików btrfs | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-devel = %{version}-%{release} | |
87 | ||
88 | %description static | |
89 | Static btrfs filesystem library. | |
90 | ||
91 | %description static -l pl.UTF-8 | |
92 | Statyczna biblioteka dla systemu plików btrfs. | |
93 | ||
6d4283bb JB |
94 | %package -n libbtrfsutil |
95 | Summary: Library for managing Btrfs filesystems | |
96 | Summary(pl.UTF-8): Biblioteka do zarządzania systemami plików Btrfs | |
97 | License: LGPL v3 | |
98 | Group: Libraries | |
99 | ||
100 | %description -n libbtrfsutil | |
101 | libbtrfsutil is a library for managing Btrfs filesystems. It is | |
102 | licensed under the LGPL. libbtrfsutil provides interfaces for a subset | |
103 | of the operations offered by the btrfs command line utility. It also | |
104 | has official Python bindings (Python 3 only). | |
105 | ||
106 | %description -n libbtrfsutil -l pl.UTF-8 | |
107 | libbtrfsutil to biblioteka do zarządzania systemami plików Btrfs. Jest | |
108 | dostępna na licencji LGPL. Udostępnia interfejsy do podzbioru operacji | |
109 | oferowanych przez narzędzie linii poleceń btrfs. Ma także oficjalne | |
110 | wiązania do Pythona (tylko Pythona 3). | |
111 | ||
112 | %package -n libbtrfsutil-devel | |
113 | Summary: Header file for libbtrfsutil library | |
114 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki libbtrfsutil | |
115 | License: LGPL v3 | |
116 | Group: Development/Libraries | |
117 | Requires: libbtrfsutil = %{version}-%{release} | |
118 | ||
119 | %description -n libbtrfsutil-devel | |
120 | Header file for libbtrfsutil library. | |
121 | ||
122 | %description -n libbtrfsutil-devel -l pl.UTF-8 | |
123 | Plik nagłówkowy biblioteki libbtrfsutil. | |
124 | ||
125 | %package -n libbtrfsutil-static | |
126 | Summary: Static libbtrfsutil library | |
127 | Summary(pl.UTF-8): Statyczna biblioteka libbtrfsutil | |
128 | License: LGPL v3 | |
129 | Group: Development/Libraries | |
130 | Requires: libbtrfsutil-devel = %{version}-%{release} | |
131 | ||
132 | %description -n libbtrfsutil-static | |
133 | Static libbtrfsutil library. | |
134 | ||
135 | %description -n libbtrfsutil-static -l pl.UTF-8 | |
136 | Statyczna biblioteka libbtrfsutil. | |
137 | ||
138 | %package -n python3-btrfsutil | |
139 | Summary: Python library for managing Btrfs filesystems | |
140 | Summary(pl.UTF-8): Biblioteka Pythona do zarządzania systemami plików Btrfs | |
141 | Group: Libraries/Python | |
142 | License: LGPL v3 | |
143 | Requires: libbtrfsutil = %{version}-%{release} | |
144 | ||
145 | %description -n python3-btrfsutil | |
146 | Python library for managing Btrfs filesystems. | |
147 | ||
148 | %description -n python3-btrfsutil -l pl.UTF-8 | |
149 | Biblioteka Pythona do zarządzania systemami plików Btrfs. | |
150 | ||
7172bf1c ER |
151 | %prep |
152 | %setup -q -n %{name}-v%{version} | |
ada6dcaf | 153 | %patch0 -p1 |
6d4283bb JB |
154 | %patch1 -p1 |
155 | %patch2 -p1 | |
e3346250 AM |
156 | |
157 | %build | |
6d4283bb | 158 | %{__aclocal} -I m4 |
82ef4e43 | 159 | %{__autoconf} |
6d4283bb JB |
160 | %configure \ |
161 | %{!?with_python:--disable-python} | |
e3346250 | 162 | %{__make} \ |
82ef4e43 | 163 | V=1 |
e3346250 | 164 | |
6d4283bb JB |
165 | %if %{with tests} |
166 | %{__make} test-libbtrfsutil | |
167 | %endif | |
168 | ||
e3346250 AM |
169 | %install |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} | |
e3346250 | 172 | %{__make} install \ |
1295fb7d | 173 | prefix=%{_prefix} \ |
e3346250 | 174 | bindir=%{_sbindir} \ |
1295fb7d | 175 | mandir=%{_mandir} \ |
7172bf1c | 176 | libdir=%{_libdir} \ |
e3346250 AM |
177 | DESTDIR=$RPM_BUILD_ROOT |
178 | ||
6d4283bb JB |
179 | %if %{with python} |
180 | %{__make} install_python \ | |
181 | prefix=%{_prefix} \ | |
182 | DESTDIR=$RPM_BUILD_ROOT | |
183 | %endif | |
184 | ||
e3346250 AM |
185 | %clean |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
6d4283bb JB |
188 | %post libs -p /sbin/ldconfig |
189 | %postun libs -p /sbin/ldconfig | |
190 | ||
191 | %post -n libbtrfsutil -p /sbin/ldconfig | |
192 | %postun -n libbtrfsutil -p /sbin/ldconfig | |
193 | ||
e3346250 AM |
194 | %files |
195 | %defattr(644,root,root,755) | |
35aaeb32 TP |
196 | %doc CHANGES README.md |
197 | %attr(755,root,root) %{_sbindir}/btrfs | |
198 | %attr(755,root,root) %{_sbindir}/btrfs-convert | |
35aaeb32 | 199 | %attr(755,root,root) %{_sbindir}/btrfs-find-root |
7172bf1c | 200 | %attr(755,root,root) %{_sbindir}/btrfs-image |
7172bf1c | 201 | %attr(755,root,root) %{_sbindir}/btrfs-map-logical |
82ef4e43 | 202 | %attr(755,root,root) %{_sbindir}/btrfs-select-super |
35aaeb32 TP |
203 | %attr(755,root,root) %{_sbindir}/btrfsck |
204 | %attr(755,root,root) %{_sbindir}/btrfstune | |
205 | %attr(755,root,root) %{_sbindir}/fsck.btrfs | |
206 | %attr(755,root,root) %{_sbindir}/mkfs.btrfs | |
ca4b502a | 207 | /lib/udev/rules.d/64-btrfs-dm.rules |
c3aff9a4 | 208 | %{_mandir}/man5/btrfs.5* |
7172bf1c | 209 | %{_mandir}/man8/btrfs.8* |
7b8b71e8 JB |
210 | %{_mandir}/man8/btrfs-*.8* |
211 | %{_mandir}/man8/btrfsck.8* | |
7172bf1c | 212 | %{_mandir}/man8/btrfstune.8* |
ada6dcaf | 213 | %{_mandir}/man8/fsck.btrfs.8* |
7b8b71e8 | 214 | %{_mandir}/man8/mkfs.btrfs.8* |
7172bf1c | 215 | |
6d4283bb JB |
216 | %files libs |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libbtrfs.so.*.* | |
219 | %attr(755,root,root) %ghost %{_libdir}/libbtrfs.so.0 | |
220 | ||
7172bf1c ER |
221 | %files devel |
222 | %defattr(644,root,root,755) | |
bc661915 | 223 | %attr(755,root,root) %{_libdir}/libbtrfs.so |
7172bf1c | 224 | %{_includedir}/btrfs |
bc661915 JB |
225 | |
226 | %files static | |
227 | %defattr(644,root,root,755) | |
228 | %{_libdir}/libbtrfs.a | |
6d4283bb JB |
229 | |
230 | %files -n libbtrfsutil | |
231 | %defattr(644,root,root,755) | |
232 | %doc libbtrfsutil/README.md | |
233 | %attr(755,root,root) %{_libdir}/libbtrfsutil.so.*.*.* | |
234 | %attr(755,root,root) %ghost %{_libdir}/libbtrfsutil.so.1 | |
235 | ||
236 | %files -n libbtrfsutil-devel | |
237 | %defattr(644,root,root,755) | |
238 | %attr(755,root,root) %{_libdir}/libbtrfsutil.so | |
239 | %{_includedir}/btrfsutil.h | |
240 | ||
241 | %files -n libbtrfsutil-static | |
242 | %defattr(644,root,root,755) | |
243 | %{_libdir}/libbtrfsutil.a | |
244 | ||
245 | %if %{with python} | |
246 | %files -n python3-btrfsutil | |
247 | %attr(755,root,root) %{py3_sitedir}/btrfsutil.cpython-*.so | |
248 | %{py3_sitedir}/btrfsutil-1.0.0-py*.egg-info | |
249 | %endif |