]>
Commit | Line | Data |
---|---|---|
1 | # TODO: PLDify init script | |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without dist_kernel # allow non-distribution kernel | |
5 | %bcond_without kernel # don't build kernel modules | |
6 | %bcond_without userspace # don't build userspace programs | |
7 | %bcond_with verbose # verbose build (V=1) | |
8 | # | |
9 | %if %{without kernel} | |
10 | %undefine with_dist_kernel | |
11 | %endif | |
12 | %if "%{_alt_kernel}" != "%{nil}" | |
13 | %undefine with_userspace | |
14 | %endif | |
15 | %if %{without userspace} | |
16 | # nothing to be placed to debuginfo package | |
17 | %define _enable_debug_packages 0 | |
18 | %endif | |
19 | Summary: Native Linux port of the ZFS filesystem | |
20 | Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS | |
21 | %define pname zfs | |
22 | Name: %{pname}%{_alt_kernel} | |
23 | Version: 0.6.3 | |
24 | %define rel 1 | |
25 | Release: %{rel} | |
26 | License: CDDL (ZFS), GPL v2+ (ZPIOS) | |
27 | Group: Applications/System | |
28 | Source0: http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/%{pname}-%{version}.tar.gz | |
29 | # Source0-md5: 5bcc32c122934d421eba68e16826637d | |
30 | Patch0: %{name}-link.patch | |
31 | URL: http://zfsonlinux.org/ | |
32 | BuildRequires: autoconf >= 2.50 | |
33 | BuildRequires: automake | |
34 | BuildRequires: libtool | |
35 | %if %{with kernel} | |
36 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.26} | |
37 | BuildRequires: kernel%{_alt_kernel}-spl-devel >= 0.6.3 | |
38 | BuildRequires: rpmbuild(macros) >= 1.379 | |
39 | %endif | |
40 | %if %{with userspace} | |
41 | BuildRequires: libblkid-devel | |
42 | BuildRequires: libselinux-devel | |
43 | BuildRequires: libuuid-devel | |
44 | BuildRequires: zlib-devel | |
45 | %endif | |
46 | Requires: %{pname}-libs = %{version}-%{release} | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | ZFS is an advanced file system and volume manager which was originally | |
51 | developed for Solaris and is now maintained by the Illumos community. | |
52 | ||
53 | ZFS on Linux, which is also known as ZoL, is currently feature | |
54 | complete. It includes fully functional and stable SPA, DMU, ZVOL, and | |
55 | ZPL layers. | |
56 | ||
57 | %description -l pl.UTF-8 | |
58 | ZFS to zaawansowany system plików i zarządca wolumenów, oryginalnie | |
59 | stworzony dla Solarisa, obecnie utrzymywany przez społeczność Illumos. | |
60 | ||
61 | ZFS dla Linuksa, znany takża jako ZoL (ZFS on Linux), jest obecnie w | |
62 | pełni funkcjonalny. Zawiera w pełni funkcjonalne i stabilne warstwy | |
63 | SPA, DMU, ZVOL i ZPL. | |
64 | ||
65 | %package libs | |
66 | Summary: ZFS on Linux libraries | |
67 | Summary(pl.UTF-8): Biblioteki ZFS-a dla Linuksa | |
68 | License: CDDL | |
69 | Group: Libraries | |
70 | ||
71 | %description libs | |
72 | ZFS on Linux libraries. | |
73 | ||
74 | %description libs -l pl.UTF-8 | |
75 | Biblioteki ZFS-a dla Linuksa. | |
76 | ||
77 | %package devel | |
78 | Summary: Header files for ZFS libraries | |
79 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek ZFS-a | |
80 | License: CDDL | |
81 | Group: Development/Libraries | |
82 | Requires: %{pname}-libs = %{version}-%{release} | |
83 | Requires: libselinux-devel | |
84 | Requires: libuuid-devel | |
85 | Requires: zlib-devel | |
86 | ||
87 | %description devel | |
88 | Header files for ZFS libraries. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Pliki nagłówkowe bibliotek ZFS-a. | |
92 | ||
93 | %package static | |
94 | Summary: Static ZFS libraries | |
95 | Summary(pl.UTF-8): Statyczne biblioteki ZFS-a | |
96 | License: CDDL | |
97 | Group: Development/Libraries | |
98 | Requires: %{pname}-devel = %{version}-%{release} | |
99 | ||
100 | %description static | |
101 | Static ZFS libraries. | |
102 | ||
103 | %description static -l pl.UTF-8 | |
104 | Statyczne biblioteki ZFS-a. | |
105 | ||
106 | %package -n dracut-zfs | |
107 | Summary: ZFS support for Dracut | |
108 | Summary(pl.UTF-8): Obsługa ZFS-a dla Dracuta | |
109 | Group: Applications/System | |
110 | Requires: %{pname} = %{version}-%{release} | |
111 | Requires: dracut | |
112 | ||
113 | %description -n dracut-zfs | |
114 | ZFS support for Dracut. | |
115 | ||
116 | %description -n dracut-zfs -l pl.UTF-8 | |
117 | Obsługa ZFS-a dla Dracuta. | |
118 | ||
119 | %package -n kernel%{_alt_kernel}-zfs | |
120 | Summary: ZFS Linux kernel modules | |
121 | Summary(pl.UTF-8): ZFS - moduły jądra Linuksa | |
122 | Release: %{rel}@%{_kernel_ver_str} | |
123 | Group: Base/Kernel | |
124 | Requires(post,postun): /sbin/depmod | |
125 | %if %{with dist_kernel} | |
126 | %requires_releq_kernel | |
127 | Requires(postun): %releq_kernel | |
128 | %endif | |
129 | ||
130 | %description -n kernel%{_alt_kernel}-zfs | |
131 | ZFS Linux kernel modules. | |
132 | ||
133 | %description -n kernel%{_alt_kernel}-zfs -l pl.UTF-8 | |
134 | ZFS - moduły jądra Linuksa. | |
135 | ||
136 | %package -n kernel%{_alt_kernel}-zfs-devel | |
137 | Summary: ZFS Linux kernel headers | |
138 | Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa | |
139 | Release: %{rel}@%{_kernel_ver_str} | |
140 | Group: Development/Building | |
141 | %{?with_dist_kernel:Requires: kernel%{_alt_kernel}-headers} | |
142 | ||
143 | %description -n kernel%{_alt_kernel}-zfs-devel | |
144 | ZFS Linux kernel headers configured for PLD kernel%{_alt_kernel}, | |
145 | version %{_kernel_ver}. | |
146 | ||
147 | %description -n kernel%{_alt_kernel}-zfs-devel -l pl.UTF-8 | |
148 | ZFS - pliki nagłówkowe jądra Linuksa skonfigurowane dla jądra PLD z | |
149 | pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}. | |
150 | ||
151 | %prep | |
152 | %setup -q | |
153 | %patch0 -p1 | |
154 | ||
155 | %build | |
156 | %{__libtoolize} | |
157 | %{__aclocal} -I config | |
158 | %{__autoconf} | |
159 | %{__autoheader} | |
160 | %{__automake} | |
161 | %configure \ | |
162 | --disable-silent-rules \ | |
163 | --with-config="%{?with_kernel:%{?with_userspace:all}}%{!?with_kernel:user}%{!?with_userspace:kernel}" \ | |
164 | --with-linux=%{_kernelsrcdir} \ | |
165 | --with-systemdunitdir=%{systemdunitdir} \ | |
166 | --with-systemdpresetdir=/etc/systemd/system-preset \ | |
167 | --with-udevdir=/lib/udev | |
168 | ||
169 | %{__make} \ | |
170 | %{?with_verbose:V=1} | |
171 | ||
172 | %install | |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
175 | %{__make} install \ | |
176 | DESTDIR=$RPM_BUILD_ROOT \ | |
177 | DEFAULT_INIT_DIR=/etc/rc.d/init.d \ | |
178 | INSTALL_MOD_DIR=misc | |
179 | ||
180 | %clean | |
181 | rm -rf $RPM_BUILD_ROOT | |
182 | ||
183 | %if %{with userspace} | |
184 | %files | |
185 | %defattr(644,root,root,755) | |
186 | %doc AUTHORS COPYRIGHT DISCLAIMER OPENSOLARIS.LICENSE README.markdown | |
187 | %attr(755,root,root) /sbin/mount.zfs | |
188 | %attr(755,root,root) %{_bindir}/arcstat.py | |
189 | %attr(755,root,root) %{_bindir}/dbufstat.py | |
190 | %attr(755,root,root) %{_sbindir}/fsck.zfs | |
191 | %attr(755,root,root) %{_sbindir}/zdb | |
192 | %attr(755,root,root) %{_sbindir}/zed | |
193 | %attr(755,root,root) %{_sbindir}/zfs | |
194 | %attr(755,root,root) %{_sbindir}/zhack | |
195 | %attr(755,root,root) %{_sbindir}/zinject | |
196 | %attr(755,root,root) %{_sbindir}/zpios | |
197 | %attr(755,root,root) %{_sbindir}/zpool | |
198 | %attr(755,root,root) %{_sbindir}/zstreamdump | |
199 | %attr(755,root,root) %{_sbindir}/ztest | |
200 | %dir %{_sysconfdir}/zfs | |
201 | # package *.example as %doc? (they cannot act as default configuration) | |
202 | %{_sysconfdir}/zfs/vdev_id.conf.*.example | |
203 | %dir %{_sysconfdir}/zfs/zed.d | |
204 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/*.sh | |
205 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/zed.rc | |
206 | %attr(754,root,root) /etc/rc.d/init.d/zfs | |
207 | /usr/lib/modules-load.d/zfs.conf | |
208 | /etc/systemd/system-preset/50-zfs.preset | |
209 | %{systemdunitdir}/zed.service | |
210 | %{systemdunitdir}/zfs.target | |
211 | %{systemdunitdir}/zfs-import-cache.service | |
212 | %{systemdunitdir}/zfs-import-scan.service | |
213 | %{systemdunitdir}/zfs-mount.service | |
214 | %{systemdunitdir}/zfs-share.service | |
215 | %attr(755,root,root) /lib/udev/vdev_id | |
216 | %attr(755,root,root) /lib/udev/zvol_id | |
217 | /lib/udev/rules.d/60-zvol.rules | |
218 | /lib/udev/rules.d/69-vdev.rules | |
219 | /lib/udev/rules.d/90-zfs.rules | |
220 | %dir %{_libdir}/zfs | |
221 | %dir %{_libdir}/zfs/zed.d | |
222 | %attr(755,root,root) %{_libdir}/zfs/zed.d/*.sh | |
223 | %dir %{_datadir}/zfs | |
224 | %attr(755,root,root) %{_datadir}/zfs/*.sh | |
225 | %dir %{_datadir}/zfs/zpios-profile | |
226 | %attr(755,root,root) %{_datadir}/zfs/zpios-profile/*.sh | |
227 | %dir %{_datadir}/zfs/zpios-test | |
228 | %attr(755,root,root) %{_datadir}/zfs/zpios-test/*.sh | |
229 | %dir %{_datadir}/zfs/zpool-config | |
230 | %attr(755,root,root) %{_datadir}/zfs/zpool-config/*.sh | |
231 | %{_mandir}/man1/zhack.1* | |
232 | %{_mandir}/man1/zpios.1* | |
233 | %{_mandir}/man1/ztest.1* | |
234 | %{_mandir}/man5/vdev_id.conf.5* | |
235 | %{_mandir}/man5/zfs-module-parameters.5* | |
236 | %{_mandir}/man5/zpool-features.5* | |
237 | %{_mandir}/man8/fsck.zfs.8* | |
238 | %{_mandir}/man8/mount.zfs.8* | |
239 | %{_mandir}/man8/vdev_id.8* | |
240 | %{_mandir}/man8/zdb.8* | |
241 | %{_mandir}/man8/zed.8* | |
242 | %{_mandir}/man8/zfs.8* | |
243 | %{_mandir}/man8/zinject.8* | |
244 | %{_mandir}/man8/zpool.8* | |
245 | %{_mandir}/man8/zstreamdump.8* | |
246 | ||
247 | %files libs | |
248 | %defattr(644,root,root,755) | |
249 | %attr(755,root,root) %{_libdir}/libnvpair.so.*.*.* | |
250 | %attr(755,root,root) %ghost %{_libdir}/libnvpair.so.1 | |
251 | %attr(755,root,root) %{_libdir}/libuutil.so.*.*.* | |
252 | %attr(755,root,root) %ghost %{_libdir}/libuutil.so.1 | |
253 | %attr(755,root,root) %{_libdir}/libzfs.so.*.*.* | |
254 | %attr(755,root,root) %ghost %{_libdir}/libzfs.so.2 | |
255 | %attr(755,root,root) %{_libdir}/libzfs_core.so.*.*.* | |
256 | %attr(755,root,root) %ghost %{_libdir}/libzfs_core.so.1 | |
257 | %attr(755,root,root) %{_libdir}/libzpool.so.*.*.* | |
258 | %attr(755,root,root) %ghost %{_libdir}/libzpool.so.2 | |
259 | ||
260 | %files devel | |
261 | %defattr(644,root,root,755) | |
262 | %attr(755,root,root) %{_libdir}/libnvpair.so | |
263 | %attr(755,root,root) %{_libdir}/libuutil.so | |
264 | %attr(755,root,root) %{_libdir}/libzfs.so | |
265 | %attr(755,root,root) %{_libdir}/libzfs_core.so | |
266 | %attr(755,root,root) %{_libdir}/libzpool.so | |
267 | %{_libdir}/libnvpair.la | |
268 | %{_libdir}/libuutil.la | |
269 | %{_libdir}/libzfs.la | |
270 | %{_libdir}/libzfs_core.la | |
271 | %{_libdir}/libzpool.la | |
272 | %{_includedir}/libspl | |
273 | %{_includedir}/libzfs | |
274 | ||
275 | %files static | |
276 | %defattr(644,root,root,755) | |
277 | %{_libdir}/libnvpair.a | |
278 | %{_libdir}/libuutil.a | |
279 | %{_libdir}/libzfs.a | |
280 | %{_libdir}/libzfs_core.a | |
281 | %{_libdir}/libzpool.a | |
282 | ||
283 | %files -n dracut-zfs | |
284 | %defattr(644,root,root,755) | |
285 | %doc dracut/README.dracut.markdown | |
286 | %dir %{_libdir}/dracut/modules.d/90zfs | |
287 | %attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/module-setup.sh | |
288 | %attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/mount-zfs.sh | |
289 | %attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/parse-zfs.sh | |
290 | %endif | |
291 | ||
292 | %if %{with kernel} | |
293 | %files -n kernel%{_alt_kernel}-zfs | |
294 | %defattr(644,root,root,755) | |
295 | %dir /lib/modules/%{_kernel_ver}/misc/avl | |
296 | /lib/modules/%{_kernel_ver}/misc/avl/zavl.ko* | |
297 | %dir /lib/modules/%{_kernel_ver}/misc/nvpair | |
298 | /lib/modules/%{_kernel_ver}/misc/nvpair/znvpair.ko* | |
299 | %dir /lib/modules/%{_kernel_ver}/misc/unicode | |
300 | /lib/modules/%{_kernel_ver}/misc/unicode/zunicode.ko* | |
301 | %dir /lib/modules/%{_kernel_ver}/misc/zcommon | |
302 | /lib/modules/%{_kernel_ver}/misc/zcommon/zcommon.ko* | |
303 | %dir /lib/modules/%{_kernel_ver}/misc/zfs | |
304 | /lib/modules/%{_kernel_ver}/misc/zfs/zfs.ko* | |
305 | %dir /lib/modules/%{_kernel_ver}/misc/zpios | |
306 | /lib/modules/%{_kernel_ver}/misc/zpios/zpios.ko* | |
307 | ||
308 | %files -n kernel%{_alt_kernel}-zfs-devel | |
309 | %defattr(644,root,root,755) | |
310 | /usr/src/zfs-%{version} | |
311 | %endif |