]>
Commit | Line | Data |
---|---|---|
006bcc7c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_without kernel # don't build kernel modules | |
006bcc7c JB |
5 | %bcond_without userspace # don't build userspace programs |
6 | %bcond_with verbose # verbose build (V=1) | |
52a371d7 | 7 | # |
f29254e6 | 8 | %if %{without kernel} |
006bcc7c JB |
9 | %undefine with_dist_kernel |
10 | %endif | |
11 | ||
b3b0fbb1 | 12 | %define rel 1 |
fb70470f | 13 | %define pname linux-fusion |
6edb6a11 JB |
14 | Summary: Fusion and One Linux kernel modules |
15 | Summary(pl.UTF-8): Moduły Fusion i One dla jądra Linuksa | |
fb70470f | 16 | Name: %{pname}%{_alt_kernel} |
b3b0fbb1 | 17 | Version: 9.0.1 |
31041c89 | 18 | Release: %{rel} |
006bcc7c JB |
19 | License: GPL v2+ |
20 | Group: Base/Kernel | |
412dbd1f | 21 | Source0: http://www.directfb.org/downloads/Core/linux-fusion/%{pname}-%{version}.tar.gz |
b3b0fbb1 | 22 | # Source0-md5: ef03d3114b51c3f42e435ccfa683be2a |
006bcc7c JB |
23 | URL: http://www.directfb.org/ |
24 | %if %{with kernel} | |
1a6461a5 JB |
25 | %{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.20.2} |
26 | BuildRequires: rpmbuild(macros) >= 1.379 | |
006bcc7c JB |
27 | %endif |
28 | BuildRequires: sed >= 4.0 | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
6edb6a11 | 32 | Fusion and One Linux kernel modules. |
006bcc7c | 33 | |
08d37a65 | 34 | %description -l pl.UTF-8 |
6edb6a11 | 35 | Moduły Fusion i One dla jądra Linuksa. |
006bcc7c JB |
36 | |
37 | %package devel | |
38 | Summary: Header file for Fusion device | |
6f0ad2f4 | 39 | Summary(pl.UTF-8): Plik nagłówkowy dla urządzenia Fusion |
006bcc7c JB |
40 | Group: Development/Libraries |
41 | Requires: linux-libc-headers | |
42 | ||
43 | %description devel | |
44 | Header file for Fusion device. | |
45 | ||
08d37a65 JR |
46 | %description devel -l pl.UTF-8 |
47 | Plik nagłówkowy dla urządzenia Fusion. | |
006bcc7c | 48 | |
6edb6a11 JB |
49 | %package -n linux-one-devel |
50 | Summary: Header file for One IPC device | |
51 | Summary(pl.UTF-8): Plik nagłówkowy dla urządzenia IPC One | |
52 | Group: Development/Libraries | |
53 | Requires: linux-libc-headers | |
54 | ||
55 | %description -n linux-one-devel | |
56 | Header file for One IPC device. | |
57 | ||
58 | Linux One is the new IPC API used by Coma. | |
59 | ||
60 | %description -n linux-one-devel -l pl.UTF-8 | |
61 | Plik nagłówkowy dla urządzenia IPC One. | |
62 | ||
63 | Linux One to nowe API IPC wykorzystywane przez Comę. | |
64 | ||
fb70470f | 65 | %package -n kernel%{_alt_kernel}-char-fusion |
006bcc7c | 66 | Summary: Fusion module for Linux kernel |
6f0ad2f4 | 67 | Summary(pl.UTF-8): Moduł Fusion dla jądra Linuksa |
31041c89 | 68 | Release: %{rel}@%{_kernel_ver_str} |
006bcc7c JB |
69 | Group: Base/Kernel |
70 | Requires(post,postun): /sbin/depmod | |
71 | %if %{with dist_kernel} | |
fb70470f JR |
72 | %requires_releq_kernel |
73 | Requires(postun): %releq_kernel | |
006bcc7c JB |
74 | %endif |
75 | ||
fb70470f | 76 | %description -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
77 | Fusion module for Linux kernel. |
78 | ||
fb70470f | 79 | %description -n kernel%{_alt_kernel}-char-fusion -l pl.UTF-8 |
08d37a65 | 80 | Moduł Fusion dla jądra Linuksa. |
006bcc7c | 81 | |
fb70470f | 82 | %package -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
83 | Summary: One IPC module for Linux kernel |
84 | Summary(pl.UTF-8): Moduł IPC One dla jądra Linuksa | |
85 | Release: %{rel}@%{_kernel_ver_str} | |
86 | Group: Base/Kernel | |
87 | Requires(post,postun): /sbin/depmod | |
88 | %if %{with dist_kernel} | |
fb70470f JR |
89 | %requires_releq_kernel |
90 | Requires(postun): %releq_kernel | |
6edb6a11 JB |
91 | %endif |
92 | ||
fb70470f | 93 | %description -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
94 | One IPC module for Linux kernel. |
95 | ||
96 | Linux One is the new IPC API used by Coma. | |
97 | ||
fb70470f | 98 | %description -n kernel%{_alt_kernel}-misc-one -l pl.UTF-8 |
6edb6a11 JB |
99 | Moduł IPC One dla jądra Linuksa. |
100 | ||
101 | Linux One to nowe API IPC wykorzystywane przez Comę. | |
102 | ||
006bcc7c | 103 | %prep |
b3b0fbb1 | 104 | %setup -q -n %{pname} |
006bcc7c | 105 | |
6edb6a11 JB |
106 | %{__sed} -i -e 's/^obj-[^ ]*/obj-m/' linux/drivers/char/fusion/Makefile-2.6 |
107 | %{__sed} -i -e 's/^obj-[^ ]*/obj-m/' one/Makefile-2.6 | |
ff217dd6 | 108 | echo "EXTRA_CFLAGS = -I`pwd`/linux/include -I`pwd`/linux/drivers/char/fusion -I`pwd`/linux/drivers/char/fusion/single" >> linux/drivers/char/fusion/Makefile-2.6 |
6edb6a11 | 109 | echo "EXTRA_CFLAGS = -I`pwd`/include -I`pwd`/one/single" >> one/Makefile-2.6 |
006bcc7c JB |
110 | |
111 | %build | |
112 | %if %{with kernel} | |
113 | cd linux/drivers/char/fusion | |
114 | ln -sf Makefile-2.6 Makefile | |
ead03d42 JB |
115 | # NOTE: build_kernel_modules (as of rpm macros 1.649) doesn't allow line breaking |
116 | %build_kernel_modules -m fusion FUSIONCORE=single | |
6edb6a11 JB |
117 | cd ../../../../one |
118 | ln -sf Makefile-2.6 Makefile | |
119 | %build_kernel_modules -m linux-one ONECORE=single | |
006bcc7c JB |
120 | %endif |
121 | ||
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %if %{with userspace} | |
126 | install -d $RPM_BUILD_ROOT%{_includedir}/linux | |
127 | install linux/include/linux/fusion.h $RPM_BUILD_ROOT%{_includedir}/linux | |
6edb6a11 | 128 | install include/linux/one.h $RPM_BUILD_ROOT%{_includedir}/linux |
006bcc7c JB |
129 | %endif |
130 | ||
131 | %if %{with kernel} | |
132 | cd linux/drivers/char/fusion | |
32ece010 | 133 | %install_kernel_modules -m fusion -d kernel/drivers/char |
6edb6a11 | 134 | cd ../../../../one |
fb70470f | 135 | %install_kernel_modules -m linux-one -d misc |
006bcc7c JB |
136 | %endif |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
fb70470f | 141 | %post -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
142 | %depmod %{_kernel_ver} |
143 | ||
fb70470f | 144 | %postun -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
145 | %depmod %{_kernel_ver} |
146 | ||
fb70470f | 147 | %post -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
148 | %depmod %{_kernel_ver} |
149 | ||
fb70470f | 150 | %postun -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
151 | %depmod %{_kernel_ver} |
152 | ||
006bcc7c JB |
153 | %if %{with userspace} |
154 | %files devel | |
155 | %defattr(644,root,root,755) | |
6edb6a11 | 156 | %doc ChangeLog README TODO |
006bcc7c | 157 | %{_includedir}/linux/fusion.h |
6edb6a11 JB |
158 | |
159 | %files -n linux-one-devel | |
160 | %defattr(644,root,root,755) | |
161 | %doc README.linux-one TODO.linux-one | |
162 | %{_includedir}/linux/one.h | |
006bcc7c JB |
163 | %endif |
164 | ||
165 | %if %{with kernel} | |
fb70470f | 166 | %files -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
167 | %defattr(644,root,root,755) |
168 | /lib/modules/%{_kernel_ver}/kernel/drivers/char/fusion.ko* | |
6edb6a11 | 169 | |
fb70470f | 170 | %files -n kernel%{_alt_kernel}-misc-one |
6edb6a11 | 171 | %defattr(644,root,root,755) |
fb70470f | 172 | /lib/modules/%{_kernel_ver}/misc/linux-one.ko* |
f29254e6 | 173 | %endif |