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