]> git.pld-linux.org Git - packages/zfs.git/blob - zfs.spec
- new
[packages/zfs.git] / zfs.spec
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.2
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:  0b183b0abdd5be287046ad9ce4f899fd
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.2
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-udevdir=/lib/udev
166
167 %{__make} \
168         %{?with_verbose:V=1}
169
170 %install
171 rm -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
179 rm -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.048272 seconds and 4 git commands to generate.