- new
[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}
23Version: 0.6.2
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
29# Source0-md5: 0b183b0abdd5be287046ad9ce4f899fd
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}
37BuildRequires: kernel%{_alt_kernel}-spl-devel >= 0.6.2
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} \
165 --with-udevdir=/lib/udev
166
167%{__make} \
168 %{?with_verbose:V=1}
169
170%install
171rm -rf $RPM_BUILD_ROOT
172
173%{__make} install \
174 DESTDIR=$RPM_BUILD_ROOT \
175 DEFAULT_INIT_DIR=/etc/rc.d/init.d \
176 INSTALL_MOD_DIR=misc
177
178%clean
179rm -rf $RPM_BUILD_ROOT
180
181%if %{with userspace}
182%files
183%defattr(644,root,root,755)
184%doc AUTHORS COPYRIGHT DISCLAIMER OPENSOLARIS.LICENSE README.markdown
185%attr(755,root,root) /sbin/mount.zfs
186%attr(755,root,root) %{_bindir}/arcstat.py
187%attr(755,root,root) %{_sbindir}/fsck.zfs
188%attr(755,root,root) %{_sbindir}/zdb
189%attr(755,root,root) %{_sbindir}/zfs
190%attr(755,root,root) %{_sbindir}/zhack
191%attr(755,root,root) %{_sbindir}/zinject
192%attr(755,root,root) %{_sbindir}/zpios
193%attr(755,root,root) %{_sbindir}/zpool
194%attr(755,root,root) %{_sbindir}/zstreamdump
195%attr(755,root,root) %{_sbindir}/ztest
196%dir %{_sysconfdir}/zfs
197# package *.example as %doc? (they cannot act as default configuration)
198%{_sysconfdir}/zfs/vdev_id.conf.*.example
199%attr(754,root,root) /etc/rc.d/init.d/zfs
200%attr(755,root,root) /lib/udev/vdev_id
201%attr(755,root,root) /lib/udev/zvol_id
202/lib/udev/rules.d/60-zvol.rules
203/lib/udev/rules.d/69-vdev.rules
204/lib/udev/rules.d/90-zfs.rules
205%dir %{_datadir}/zfs
206%attr(755,root,root) %{_datadir}/zfs/*.sh
207%dir %{_datadir}/zfs/zpios-profile
208%attr(755,root,root) %{_datadir}/zfs/zpios-profile/*.sh
209%dir %{_datadir}/zfs/zpios-test
210%attr(755,root,root) %{_datadir}/zfs/zpios-test/*.sh
211%dir %{_datadir}/zfs/zpool-config
212%attr(755,root,root) %{_datadir}/zfs/zpool-config/*.sh
213%{_mandir}/man1/zhack.1*
214%{_mandir}/man1/zpios.1*
215%{_mandir}/man1/ztest.1*
216%{_mandir}/man5/vdev_id.conf.5*
217%{_mandir}/man5/zpool-features.5*
218%{_mandir}/man8/fsck.zfs.8*
219%{_mandir}/man8/mount.zfs.8*
220%{_mandir}/man8/vdev_id.8*
221%{_mandir}/man8/zdb.8*
222%{_mandir}/man8/zfs.8*
223%{_mandir}/man8/zinject.8*
224%{_mandir}/man8/zpool.8*
225%{_mandir}/man8/zstreamdump.8*
226
227%files libs
228%defattr(644,root,root,755)
229%attr(755,root,root) %{_libdir}/libnvpair.so.*.*.*
230%attr(755,root,root) %ghost %{_libdir}/libnvpair.so.1
231%attr(755,root,root) %{_libdir}/libuutil.so.*.*.*
232%attr(755,root,root) %ghost %{_libdir}/libuutil.so.1
233%attr(755,root,root) %{_libdir}/libzfs.so.*.*.*
234%attr(755,root,root) %ghost %{_libdir}/libzfs.so.1
235%attr(755,root,root) %{_libdir}/libzpool.so.*.*.*
236%attr(755,root,root) %ghost %{_libdir}/libzpool.so.1
237
238%files devel
239%defattr(644,root,root,755)
240%attr(755,root,root) %{_libdir}/libnvpair.so
241%attr(755,root,root) %{_libdir}/libuutil.so
242%attr(755,root,root) %{_libdir}/libzfs.so
243%attr(755,root,root) %{_libdir}/libzpool.so
244%{_libdir}/libnvpair.la
245%{_libdir}/libuutil.la
246%{_libdir}/libzfs.la
247%{_libdir}/libzpool.la
248%{_includedir}/libspl
249%{_includedir}/libzfs
250
251%files static
252%defattr(644,root,root,755)
253%{_libdir}/libnvpair.a
254%{_libdir}/libuutil.a
255%{_libdir}/libzfs.a
256%{_libdir}/libzpool.a
257
258%files -n dracut-zfs
259%defattr(644,root,root,755)
260%doc dracut/README.dracut.markdown
261%dir %{_libdir}/dracut/modules.d/90zfs
262%attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/module-setup.sh
263%attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/mount-zfs.sh
264%attr(755,root,root) %{_libdir}/dracut/modules.d/90zfs/parse-zfs.sh
265%endif
266
267%if %{with kernel}
268%files -n kernel%{_alt_kernel}-zfs
269%defattr(644,root,root,755)
270%dir /lib/modules/%{_kernel_ver}/misc/avl
271/lib/modules/%{_kernel_ver}/misc/avl/zavl.ko*
272%dir /lib/modules/%{_kernel_ver}/misc/nvpair
273/lib/modules/%{_kernel_ver}/misc/nvpair/znvpair.ko*
274%dir /lib/modules/%{_kernel_ver}/misc/unicode
275/lib/modules/%{_kernel_ver}/misc/unicode/zunicode.ko*
276%dir /lib/modules/%{_kernel_ver}/misc/zcommon
277/lib/modules/%{_kernel_ver}/misc/zcommon/zcommon.ko*
278%dir /lib/modules/%{_kernel_ver}/misc/zfs
279/lib/modules/%{_kernel_ver}/misc/zfs/zfs.ko*
280%dir /lib/modules/%{_kernel_ver}/misc/zpios
281/lib/modules/%{_kernel_ver}/misc/zpios/zpios.ko*
282
283%files -n kernel%{_alt_kernel}-zfs-devel
284%defattr(644,root,root,755)
285/usr/src/zfs-%{version}
286%endif
This page took 0.134068 seconds and 4 git commands to generate.