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