]> git.pld-linux.org Git - packages/zfs.git/blame - zfs.spec
- up to 0.6.5.4
[packages/zfs.git] / zfs.spec
CommitLineData
bff0a8a1
JB
1# TODO: PLDify init script
2#
3# Conditional build:
bff0a8a1
JB
4%bcond_without kernel # don't build kernel modules
5%bcond_without userspace # don't build userspace programs
6%bcond_with verbose # verbose build (V=1)
7#
3921af7f
JR
8# The goal here is to have main, userspace, package built once with
9# simple release number, and only rebuild kernel packages with kernel
10# version as part of release number, without the need to bump release
11# with every kernel change.
12%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
13%{error:kernel and userspace cannot be built at the same time on PLD builders}
14exit 1
15%endif
16
bff0a8a1
JB
17%if %{without userspace}
18# nothing to be placed to debuginfo package
19%define _enable_debug_packages 0
20%endif
3921af7f
JR
21
22%define _duplicate_files_terminate_build 0
23
3921af7f 24%define pname zfs
58d00fd6 25%define rel 1
bff0a8a1
JB
26Summary: Native Linux port of the ZFS filesystem
27Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS
3921af7f 28Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
88de7ed4 29Version: 0.6.5.4
3921af7f 30Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
bff0a8a1
JB
31License: CDDL (ZFS), GPL v2+ (ZPIOS)
32Group: Applications/System
33Source0: http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/%{pname}-%{version}.tar.gz
88de7ed4 34# Source0-md5: a0f77516c35088ed4dee56352f1aca58
3921af7f 35Patch0: %{pname}-link.patch
58d00fd6 36Patch1: x32.patch
bff0a8a1
JB
37URL: http://zfsonlinux.org/
38BuildRequires: autoconf >= 2.50
39BuildRequires: automake
40BuildRequires: libtool
1b58aab1 41BuildRequires: rpmbuild(macros) >= 1.701
2d67b9de
JR
42%if %{with kernel}
43%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
44%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-spl-devel >= 0.6.3}
45%endif
bff0a8a1
JB
46%if %{with userspace}
47BuildRequires: libblkid-devel
48BuildRequires: libselinux-devel
49BuildRequires: libuuid-devel
50BuildRequires: zlib-devel
51%endif
52Requires: %{pname}-libs = %{version}-%{release}
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
8fa57ce6
JP
55%define dracutlibdir %{_prefix}/lib/dracut
56
bff0a8a1
JB
57%description
58ZFS is an advanced file system and volume manager which was originally
59developed for Solaris and is now maintained by the Illumos community.
60
61ZFS on Linux, which is also known as ZoL, is currently feature
62complete. It includes fully functional and stable SPA, DMU, ZVOL, and
63ZPL layers.
64
65%description -l pl.UTF-8
66ZFS to zaawansowany system plików i zarządca wolumenów, oryginalnie
67stworzony dla Solarisa, obecnie utrzymywany przez społeczność Illumos.
68
69ZFS dla Linuksa, znany takża jako ZoL (ZFS on Linux), jest obecnie w
70pełni funkcjonalny. Zawiera w pełni funkcjonalne i stabilne warstwy
71SPA, DMU, ZVOL i ZPL.
72
73%package libs
74Summary: ZFS on Linux libraries
75Summary(pl.UTF-8): Biblioteki ZFS-a dla Linuksa
76License: CDDL
77Group: Libraries
8fa57ce6 78Requires(post,postun): /sbin/ldconfig
bff0a8a1
JB
79
80%description libs
81ZFS on Linux libraries.
82
83%description libs -l pl.UTF-8
84Biblioteki ZFS-a dla Linuksa.
85
86%package devel
87Summary: Header files for ZFS libraries
88Summary(pl.UTF-8): Pliki nagłówkowe bibliotek ZFS-a
89License: CDDL
90Group: Development/Libraries
91Requires: %{pname}-libs = %{version}-%{release}
92Requires: libselinux-devel
93Requires: libuuid-devel
94Requires: zlib-devel
95
96%description devel
97Header files for ZFS libraries.
98
99%description devel -l pl.UTF-8
100Pliki nagłówkowe bibliotek ZFS-a.
101
102%package static
103Summary: Static ZFS libraries
104Summary(pl.UTF-8): Statyczne biblioteki ZFS-a
105License: CDDL
106Group: Development/Libraries
107Requires: %{pname}-devel = %{version}-%{release}
108
109%description static
110Static ZFS libraries.
111
112%description static -l pl.UTF-8
113Statyczne biblioteki ZFS-a.
114
115%package -n dracut-zfs
116Summary: ZFS support for Dracut
117Summary(pl.UTF-8): Obsługa ZFS-a dla Dracuta
118Group: Applications/System
119Requires: %{pname} = %{version}-%{release}
120Requires: dracut
121
122%description -n dracut-zfs
123ZFS support for Dracut.
124
125%description -n dracut-zfs -l pl.UTF-8
126Obsługa ZFS-a dla Dracuta.
127
3921af7f 128%package -n kernel-zfs-common-devel
bff0a8a1
JB
129Summary: ZFS Linux kernel headers
130Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa
bff0a8a1 131Group: Development/Building
bff0a8a1 132
3921af7f
JR
133%description -n kernel-zfs-common-devel
134ZFS Linux kernel headers common for all PLD kernel versions.
135
136%description -n kernel-zfs-common-devel -l pl.UTF-8
137ZFS - pliki nagłówkowe jądra Linuksa wspólne na wszystkich
138wersji jąder PLD.
139
140%define kernel_pkg()\
141%package -n kernel%{_alt_kernel}-zfs\
142Summary: ZFS Linux kernel modules\
143Summary(pl.UTF-8): ZFS - moduły jądra Linuksa\
144Release: %{rel}@%{_kernel_ver_str}\
145Group: Base/Kernel\
146Requires(post,postun): /sbin/depmod\
3921af7f
JR
147%requires_releq_kernel\
148Requires(postun): %releq_kernel\
3921af7f
JR
149\
150%description -n kernel%{_alt_kernel}-zfs\
151ZFS Linux kernel modules.\
152\
153%description -n kernel%{_alt_kernel}-zfs -l pl.UTF-8\
154ZFS - moduły jądra Linuksa.\
155\
156%package -n kernel%{_alt_kernel}-zfs-devel\
157Summary: ZFS Linux kernel headers\
158Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa\
159Release: %{rel}@%{_kernel_ver_str}\
160Group: Development/Building\
3921af7f
JR
161Requires: kernel%{_alt_kernel}-headers\
162Requires: kernel-zfs-common-devel\
3921af7f
JR
163\
164%description -n kernel%{_alt_kernel}-zfs-devel\
165ZFS Linux kernel headers configured for PLD kernel%{_alt_kernel},\
166version %{_kernel_ver}.\
167\
168%description -n kernel%{_alt_kernel}-zfs-devel -l pl.UTF-8\
169ZFS - pliki nagłówkowe jądra Linuksa skonfigurowane dla jądra PLD z\
170pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}.\
171\
172%files -n kernel%{_alt_kernel}-zfs\
173%defattr(644,root,root,755)\
174%dir /lib/modules/%{_kernel_ver}/misc/avl\
175/lib/modules/%{_kernel_ver}/misc/avl/zavl.ko*\
176%dir /lib/modules/%{_kernel_ver}/misc/nvpair\
177/lib/modules/%{_kernel_ver}/misc/nvpair/znvpair.ko*\
178%dir /lib/modules/%{_kernel_ver}/misc/unicode\
179/lib/modules/%{_kernel_ver}/misc/unicode/zunicode.ko*\
180%dir /lib/modules/%{_kernel_ver}/misc/zcommon\
181/lib/modules/%{_kernel_ver}/misc/zcommon/zcommon.ko*\
182%dir /lib/modules/%{_kernel_ver}/misc/zfs\
183/lib/modules/%{_kernel_ver}/misc/zfs/zfs.ko*\
184%dir /lib/modules/%{_kernel_ver}/misc/zpios\
185/lib/modules/%{_kernel_ver}/misc/zpios/zpios.ko*\
186\
187%files -n kernel%{_alt_kernel}-zfs-devel\
188%defattr(644,root,root,755)\
189/usr/src/zfs-%{version}/%{_kernel_ver}\
190\
191%post -n kernel%{_alt_kernel}-zfs\
192%depmod %{_kernel_ver}\
193\
194%postun -n kernel%{_alt_kernel}-zfs\
195%depmod %{_kernel_ver}\
196%{nil}
197
198%define build_kernel_pkg()\
199%configure \\\
200 --disable-silent-rules \\\
201 --with-config="kernel" \\\
f2042a9c
JR
202 --with-linux=%{_kernelsrcdir}\\\
203 --with-linux-obj=%{_kernelsrcdir}\
3921af7f
JR
204\
205%{__make} clean\
206%{__make} %{?with_verbose:V=1}\
207p=`pwd`\
208%{__make} install DESTDIR=$p/installed INSTALL_MOD_DIR=misc\
209%{nil}
210
2d67b9de 211%{?with_kernel:%{expand:%create_kernel_packages}}
bff0a8a1
JB
212
213%prep
3921af7f 214%setup -q -n %{pname}-%{version}
bff0a8a1 215%patch0 -p1
97d46215 216%patch1 -p1
bff0a8a1
JB
217
218%build
219%{__libtoolize}
220%{__aclocal} -I config
221%{__autoconf}
222%{__autoheader}
223%{__automake}
2d67b9de 224%{?with_kernel:%{expand:%build_kernel_packages}}
3921af7f
JR
225
226%if %{with userspace}
bff0a8a1
JB
227%configure \
228 --disable-silent-rules \
3921af7f 229 --with-config="user" \
bff0a8a1 230 --with-linux=%{_kernelsrcdir} \
ec61a23e
JB
231 --with-systemdunitdir=%{systemdunitdir} \
232 --with-systemdpresetdir=/etc/systemd/system-preset \
bff0a8a1
JB
233 --with-udevdir=/lib/udev
234
235%{__make} \
236 %{?with_verbose:V=1}
3921af7f 237%endif
bff0a8a1
JB
238
239%install
240rm -rf $RPM_BUILD_ROOT
241
3921af7f
JR
242%if %{with kernel}
243install -d $RPM_BUILD_ROOT
244cp -a installed/* $RPM_BUILD_ROOT
245%endif
246
247%if %{with userspace}
bff0a8a1
JB
248%{__make} install \
249 DESTDIR=$RPM_BUILD_ROOT \
3921af7f 250 DEFAULT_INIT_DIR=/etc/rc.d/init.d
58d00fd6
JR
251
252install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
253%{__mv} $RPM_BUILD_ROOT%{_npkgconfigdir}/* $RPM_BUILD_ROOT%{_pkgconfigdir}
3921af7f 254%endif
bff0a8a1
JB
255
256%clean
257rm -rf $RPM_BUILD_ROOT
258
8fa57ce6
JP
259%post libs -p /sbin/ldconfig
260%postun libs -p /sbin/ldconfig
261
bff0a8a1
JB
262%if %{with userspace}
263%files
264%defattr(644,root,root,755)
265%doc AUTHORS COPYRIGHT DISCLAIMER OPENSOLARIS.LICENSE README.markdown
266%attr(755,root,root) /sbin/mount.zfs
58d00fd6 267%attr(755,root,root) %{_bindir}/arc_summary.py
bff0a8a1 268%attr(755,root,root) %{_bindir}/arcstat.py
ec61a23e 269%attr(755,root,root) %{_bindir}/dbufstat.py
bff0a8a1
JB
270%attr(755,root,root) %{_sbindir}/fsck.zfs
271%attr(755,root,root) %{_sbindir}/zdb
ec61a23e 272%attr(755,root,root) %{_sbindir}/zed
bff0a8a1
JB
273%attr(755,root,root) %{_sbindir}/zfs
274%attr(755,root,root) %{_sbindir}/zhack
275%attr(755,root,root) %{_sbindir}/zinject
276%attr(755,root,root) %{_sbindir}/zpios
277%attr(755,root,root) %{_sbindir}/zpool
278%attr(755,root,root) %{_sbindir}/zstreamdump
279%attr(755,root,root) %{_sbindir}/ztest
280%dir %{_sysconfdir}/zfs
281# package *.example as %doc? (they cannot act as default configuration)
282%{_sysconfdir}/zfs/vdev_id.conf.*.example
ec61a23e
JB
283%dir %{_sysconfdir}/zfs/zed.d
284%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/*.sh
285%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/zed.rc
58d00fd6
JR
286%attr(754,root,root) /etc/rc.d/init.d/zfs-import
287%attr(754,root,root) /etc/rc.d/init.d/zfs-mount
288%attr(754,root,root) /etc/rc.d/init.d/zfs-share
289%attr(754,root,root) /etc/rc.d/init.d/zfs-zed
290%config(noreplace) %verify(not md5 mtime size) /etc/default/zfs
291/etc/zfs/zfs-functions
ec61a23e
JB
292/usr/lib/modules-load.d/zfs.conf
293/etc/systemd/system-preset/50-zfs.preset
294%{systemdunitdir}/zed.service
295%{systemdunitdir}/zfs.target
296%{systemdunitdir}/zfs-import-cache.service
297%{systemdunitdir}/zfs-import-scan.service
298%{systemdunitdir}/zfs-mount.service
299%{systemdunitdir}/zfs-share.service
bff0a8a1
JB
300%attr(755,root,root) /lib/udev/vdev_id
301%attr(755,root,root) /lib/udev/zvol_id
302/lib/udev/rules.d/60-zvol.rules
303/lib/udev/rules.d/69-vdev.rules
304/lib/udev/rules.d/90-zfs.rules
ec61a23e
JB
305%dir %{_libdir}/zfs
306%dir %{_libdir}/zfs/zed.d
307%attr(755,root,root) %{_libdir}/zfs/zed.d/*.sh
bff0a8a1
JB
308%dir %{_datadir}/zfs
309%attr(755,root,root) %{_datadir}/zfs/*.sh
310%dir %{_datadir}/zfs/zpios-profile
311%attr(755,root,root) %{_datadir}/zfs/zpios-profile/*.sh
312%dir %{_datadir}/zfs/zpios-test
313%attr(755,root,root) %{_datadir}/zfs/zpios-test/*.sh
314%dir %{_datadir}/zfs/zpool-config
315%attr(755,root,root) %{_datadir}/zfs/zpool-config/*.sh
316%{_mandir}/man1/zhack.1*
317%{_mandir}/man1/zpios.1*
318%{_mandir}/man1/ztest.1*
319%{_mandir}/man5/vdev_id.conf.5*
58d00fd6 320%{_mandir}/man5/zfs-events.5*
ec61a23e 321%{_mandir}/man5/zfs-module-parameters.5*
bff0a8a1
JB
322%{_mandir}/man5/zpool-features.5*
323%{_mandir}/man8/fsck.zfs.8*
324%{_mandir}/man8/mount.zfs.8*
325%{_mandir}/man8/vdev_id.8*
326%{_mandir}/man8/zdb.8*
ec61a23e 327%{_mandir}/man8/zed.8*
bff0a8a1
JB
328%{_mandir}/man8/zfs.8*
329%{_mandir}/man8/zinject.8*
330%{_mandir}/man8/zpool.8*
331%{_mandir}/man8/zstreamdump.8*
332
333%files libs
334%defattr(644,root,root,755)
335%attr(755,root,root) %{_libdir}/libnvpair.so.*.*.*
336%attr(755,root,root) %ghost %{_libdir}/libnvpair.so.1
337%attr(755,root,root) %{_libdir}/libuutil.so.*.*.*
338%attr(755,root,root) %ghost %{_libdir}/libuutil.so.1
339%attr(755,root,root) %{_libdir}/libzfs.so.*.*.*
ec61a23e
JB
340%attr(755,root,root) %ghost %{_libdir}/libzfs.so.2
341%attr(755,root,root) %{_libdir}/libzfs_core.so.*.*.*
342%attr(755,root,root) %ghost %{_libdir}/libzfs_core.so.1
bff0a8a1 343%attr(755,root,root) %{_libdir}/libzpool.so.*.*.*
ec61a23e 344%attr(755,root,root) %ghost %{_libdir}/libzpool.so.2
bff0a8a1
JB
345
346%files devel
347%defattr(644,root,root,755)
348%attr(755,root,root) %{_libdir}/libnvpair.so
349%attr(755,root,root) %{_libdir}/libuutil.so
350%attr(755,root,root) %{_libdir}/libzfs.so
ec61a23e 351%attr(755,root,root) %{_libdir}/libzfs_core.so
bff0a8a1
JB
352%attr(755,root,root) %{_libdir}/libzpool.so
353%{_libdir}/libnvpair.la
354%{_libdir}/libuutil.la
355%{_libdir}/libzfs.la
ec61a23e 356%{_libdir}/libzfs_core.la
bff0a8a1
JB
357%{_libdir}/libzpool.la
358%{_includedir}/libspl
359%{_includedir}/libzfs
58d00fd6
JR
360%{_pkgconfigdir}/libzfs.pc
361%{_pkgconfigdir}/libzfs_core.pc
bff0a8a1
JB
362
363%files static
364%defattr(644,root,root,755)
365%{_libdir}/libnvpair.a
366%{_libdir}/libuutil.a
367%{_libdir}/libzfs.a
ec61a23e 368%{_libdir}/libzfs_core.a
bff0a8a1
JB
369%{_libdir}/libzpool.a
370
371%files -n dracut-zfs
372%defattr(644,root,root,755)
58d00fd6 373%doc contrib/dracut/README.dracut.markdown
8fa57ce6 374%dir %{dracutlibdir}/modules.d/90zfs
58d00fd6 375%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/export-zfs.sh
8fa57ce6
JP
376%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/module-setup.sh
377%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/mount-zfs.sh
378%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/parse-zfs.sh
58d00fd6 379%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-lib.sh
bff0a8a1
JB
380%endif
381
382%if %{with kernel}
3921af7f 383%files -n kernel-zfs-common-devel
bff0a8a1 384%defattr(644,root,root,755)
e11b2ec8 385%dir /usr/src/zfs-%{version}
3921af7f
JR
386/usr/src/zfs-%{version}/include
387/usr/src/zfs-%{version}/zfs.release.in
388/usr/src/zfs-%{version}/zfs_config.h.in
bff0a8a1 389%endif
This page took 0.076217 seconds and 4 git commands to generate.