- updated to 0.6.3
[packages/zfs.git] / zfs.spec
CommitLineData
bff0a8a1
JB
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
19Summary: Native Linux port of the ZFS filesystem
20Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS
21%define pname zfs
22Name: %{pname}%{_alt_kernel}
ec61a23e 23Version: 0.6.3
bff0a8a1
JB
24%define rel 1
25Release: %{rel}
26License: CDDL (ZFS), GPL v2+ (ZPIOS)
27Group: Applications/System
28Source0: http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/%{pname}-%{version}.tar.gz
ec61a23e 29# Source0-md5: 5bcc32c122934d421eba68e16826637d
bff0a8a1
JB
30Patch0: %{name}-link.patch
31URL: http://zfsonlinux.org/
32BuildRequires: autoconf >= 2.50
33BuildRequires: automake
34BuildRequires: libtool
35%if %{with kernel}
36%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.26}
ec61a23e 37BuildRequires: kernel%{_alt_kernel}-spl-devel >= 0.6.3
bff0a8a1
JB
38BuildRequires: rpmbuild(macros) >= 1.379
39%endif
40%if %{with userspace}
41BuildRequires: libblkid-devel
42BuildRequires: libselinux-devel
43BuildRequires: libuuid-devel
44BuildRequires: zlib-devel
45%endif
46Requires: %{pname}-libs = %{version}-%{release}
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50ZFS is an advanced file system and volume manager which was originally
51developed for Solaris and is now maintained by the Illumos community.
52
53ZFS on Linux, which is also known as ZoL, is currently feature
54complete. It includes fully functional and stable SPA, DMU, ZVOL, and
55ZPL layers.
56
57%description -l pl.UTF-8
58ZFS to zaawansowany system plików i zarządca wolumenów, oryginalnie
59stworzony dla Solarisa, obecnie utrzymywany przez społeczność Illumos.
60
61ZFS dla Linuksa, znany takża jako ZoL (ZFS on Linux), jest obecnie w
62pełni funkcjonalny. Zawiera w pełni funkcjonalne i stabilne warstwy
63SPA, DMU, ZVOL i ZPL.
64
65%package libs
66Summary: ZFS on Linux libraries
67Summary(pl.UTF-8): Biblioteki ZFS-a dla Linuksa
68License: CDDL
69Group: Libraries
70
71%description libs
72ZFS on Linux libraries.
73
74%description libs -l pl.UTF-8
75Biblioteki ZFS-a dla Linuksa.
76
77%package devel
78Summary: Header files for ZFS libraries
79Summary(pl.UTF-8): Pliki nagłówkowe bibliotek ZFS-a
80License: CDDL
81Group: Development/Libraries
82Requires: %{pname}-libs = %{version}-%{release}
83Requires: libselinux-devel
84Requires: libuuid-devel
85Requires: zlib-devel
86
87%description devel
88Header files for ZFS libraries.
89
90%description devel -l pl.UTF-8
91Pliki nagłówkowe bibliotek ZFS-a.
92
93%package static
94Summary: Static ZFS libraries
95Summary(pl.UTF-8): Statyczne biblioteki ZFS-a
96License: CDDL
97Group: Development/Libraries
98Requires: %{pname}-devel = %{version}-%{release}
99
100%description static
101Static ZFS libraries.
102
103%description static -l pl.UTF-8
104Statyczne biblioteki ZFS-a.
105
106%package -n dracut-zfs
107Summary: ZFS support for Dracut
108Summary(pl.UTF-8): Obsługa ZFS-a dla Dracuta
109Group: Applications/System
110Requires: %{pname} = %{version}-%{release}
111Requires: dracut
112
113%description -n dracut-zfs
114ZFS support for Dracut.
115
116%description -n dracut-zfs -l pl.UTF-8
117Obsługa ZFS-a dla Dracuta.
118
119%package -n kernel%{_alt_kernel}-zfs
120Summary: ZFS Linux kernel modules
121Summary(pl.UTF-8): ZFS - moduły jądra Linuksa
122Release: %{rel}@%{_kernel_ver_str}
123Group: Base/Kernel
124Requires(post,postun): /sbin/depmod
125%if %{with dist_kernel}
126%requires_releq_kernel
127Requires(postun): %releq_kernel
128%endif
129
130%description -n kernel%{_alt_kernel}-zfs
131ZFS Linux kernel modules.
132
133%description -n kernel%{_alt_kernel}-zfs -l pl.UTF-8
134ZFS - moduły jądra Linuksa.
135
136%package -n kernel%{_alt_kernel}-zfs-devel
137Summary: ZFS Linux kernel headers
138Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa
139Release: %{rel}@%{_kernel_ver_str}
140Group: Development/Building
141%{?with_dist_kernel:Requires: kernel%{_alt_kernel}-headers}
142
143%description -n kernel%{_alt_kernel}-zfs-devel
144ZFS Linux kernel headers configured for PLD kernel%{_alt_kernel},
145version %{_kernel_ver}.
146
147%description -n kernel%{_alt_kernel}-zfs-devel -l pl.UTF-8
148ZFS - pliki nagłówkowe jądra Linuksa skonfigurowane dla jądra PLD z
149pakietu 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} \
ec61a23e
JB
165 --with-systemdunitdir=%{systemdunitdir} \
166 --with-systemdpresetdir=/etc/systemd/system-preset \
bff0a8a1
JB
167 --with-udevdir=/lib/udev
168
169%{__make} \
170 %{?with_verbose:V=1}
171
172%install
173rm -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
181rm -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
ec61a23e 189%attr(755,root,root) %{_bindir}/dbufstat.py
bff0a8a1
JB
190%attr(755,root,root) %{_sbindir}/fsck.zfs
191%attr(755,root,root) %{_sbindir}/zdb
ec61a23e 192%attr(755,root,root) %{_sbindir}/zed
bff0a8a1
JB
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
ec61a23e
JB
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
bff0a8a1 206%attr(754,root,root) /etc/rc.d/init.d/zfs
ec61a23e
JB
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
bff0a8a1
JB
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
ec61a23e
JB
220%dir %{_libdir}/zfs
221%dir %{_libdir}/zfs/zed.d
222%attr(755,root,root) %{_libdir}/zfs/zed.d/*.sh
bff0a8a1
JB
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*
ec61a23e 235%{_mandir}/man5/zfs-module-parameters.5*
bff0a8a1
JB
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*
ec61a23e 241%{_mandir}/man8/zed.8*
bff0a8a1
JB
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.*.*.*
ec61a23e
JB
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
bff0a8a1 257%attr(755,root,root) %{_libdir}/libzpool.so.*.*.*
ec61a23e 258%attr(755,root,root) %ghost %{_libdir}/libzpool.so.2
bff0a8a1
JB
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
ec61a23e 265%attr(755,root,root) %{_libdir}/libzfs_core.so
bff0a8a1
JB
266%attr(755,root,root) %{_libdir}/libzpool.so
267%{_libdir}/libnvpair.la
268%{_libdir}/libuutil.la
269%{_libdir}/libzfs.la
ec61a23e 270%{_libdir}/libzfs_core.la
bff0a8a1
JB
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
ec61a23e 280%{_libdir}/libzfs_core.a
bff0a8a1
JB
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
This page took 0.084398 seconds and 4 git commands to generate.