]>
Commit | Line | Data |
---|---|---|
465ece3e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
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 | # | |
8 | %if %{without kernel} | |
9 | %undefine with_dist_kernel | |
10 | %endif | |
8535b998 | 11 | |
465ece3e JB |
12 | %if "%{_alt_kernel}" != "%{nil}" |
13 | %undefine with_userspace | |
14 | %endif | |
8535b998 | 15 | |
465ece3e JB |
16 | %if %{without userspace} |
17 | # nothing to be placed to debuginfo package | |
18 | %define _enable_debug_packages 0 | |
19 | %endif | |
8535b998 JR |
20 | |
21 | %define pname spl | |
85fdfb9d | 22 | %define rel 5 |
465ece3e JB |
23 | Summary: Solaris Porting Layer |
24 | Summary(pl.UTF-8): Solaris Porting Layer - warstwa do portowania kodu z Solarisa | |
465ece3e JB |
25 | Name: %{pname}%{_alt_kernel} |
26 | Version: 0.6.2 | |
465ece3e JB |
27 | Release: %{rel} |
28 | License: GPL v2+ | |
29 | Group: Applications/System | |
191eb534 | 30 | Source0: http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/%{pname}-%{version}.tar.gz |
465ece3e JB |
31 | # Source0-md5: f00535bf89a7fde0e08f44a14a1f1e03 |
32 | URL: http://zfsonlinux.org/ | |
33 | %if %{with kernel} | |
34 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
35 | BuildRequires: rpmbuild(macros) >= 1.379 | |
36 | %endif | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | Solaris Porting Layer. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Solaris Porting Layer - warstwa do portowania kodu z Solarisa. | |
44 | ||
45 | %package -n kernel%{_alt_kernel}-spl | |
46 | Summary: Solaris Porting Layer - Linux kernel modules | |
47 | Summary(pl.UTF-8): Solaris Porting Layer - moduły jądra Linuksa | |
48 | Release: %{rel}@%{_kernel_ver_str} | |
49 | Group: Base/Kernel | |
50 | Requires(post,postun): /sbin/depmod | |
51 | %if %{with dist_kernel} | |
52 | %requires_releq_kernel | |
53 | Requires(postun): %releq_kernel | |
54 | %endif | |
55 | ||
56 | %description -n kernel%{_alt_kernel}-spl | |
57 | Solaris Porting Layer - Linux kernel modules. | |
58 | ||
59 | %description -n kernel%{_alt_kernel}-spl -l pl.UTF-8 | |
60 | Solaris Porting Layer - moduły jądra Linuksa. | |
61 | ||
62 | %package -n kernel%{_alt_kernel}-spl-devel | |
63 | Summary: Solaris Porting Layer - Linux kernel headers | |
64 | Summary(pl.UTF-8): Solaris Porting Layer - pliki nagłówkowe jądra Linuksa | |
e073ff64 | 65 | Release: %{rel}@%{_kernel_ver_str} |
465ece3e JB |
66 | Group: Development/Building |
67 | %{?with_dist_kernel:Requires: kernel%{_alt_kernel}-headers} | |
68 | ||
69 | %description -n kernel%{_alt_kernel}-spl-devel | |
70 | Solaris Porting Layer - Linux kernel headers configured for PLD | |
71 | kernel%{_alt_kernel}, version %{_kernel_ver}. | |
72 | ||
73 | %description -n kernel%{_alt_kernel}-spl-devel -l pl.UTF-8 | |
74 | Solaris Porting Layer - pliki nagłówkowe jądra Linuksa skonfigurowane | |
75 | dla jądra PLD z pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}. | |
76 | ||
77 | %prep | |
c59747d1 | 78 | %setup -q -n %{pname}-%{version} |
465ece3e JB |
79 | |
80 | %build | |
81 | %configure \ | |
82 | --disable-silent-rules \ | |
83 | --with-config="%{?with_kernel:%{?with_userspace:all}}%{!?with_kernel:user}%{!?with_userspace:kernel}" \ | |
84 | --with-linux=%{_kernelsrcdir} | |
85 | ||
ce3c5ca8 JB |
86 | %{__make} \ |
87 | %{?with_verbose:V=1} | |
465ece3e JB |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %{__make} install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT \ | |
94 | INSTALL_MOD_DIR=misc | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %if %{with userspace} | |
100 | %files | |
101 | %defattr(644,root,root,755) | |
ce3c5ca8 | 102 | %doc AUTHORS DISCLAIMER |
465ece3e JB |
103 | %attr(755,root,root) %{_sbindir}/splat |
104 | %{_mandir}/man1/splat.1* | |
105 | %endif | |
106 | ||
107 | %if %{with kernel} | |
108 | %files -n kernel%{_alt_kernel}-spl | |
109 | %defattr(644,root,root,755) | |
110 | %dir /lib/modules/%{_kernel_ver}/misc/spl | |
111 | /lib/modules/%{_kernel_ver}/misc/spl/spl.ko* | |
112 | %dir /lib/modules/%{_kernel_ver}/misc/splat | |
113 | /lib/modules/%{_kernel_ver}/misc/splat/splat.ko* | |
114 | ||
115 | %files -n kernel%{_alt_kernel}-spl-devel | |
116 | %defattr(644,root,root,755) | |
117 | /usr/src/spl-%{version} | |
118 | %endif |